diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000000..399b176e1d0 --- /dev/null +++ b/.flake8 @@ -0,0 +1,32 @@ +[flake8] +ignore = + E121, + E126, + E127, + E128, + E203, + E225, + E226, + E231, + E241, + E251, + E261, + E265, + E302, + E303, + E305, + E402, + E501, + E741, + W291, + W292, + W293, + W391, + W503, + W504, + F403, + B007, + B950, + W191, + +max-line-length = 200 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 213445b806e..7968edc40ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,8 +40,7 @@ install: - cd ~ - nvm install 10 - - git clone https://github.com/frappe/bench --depth 1 - - pip install -e ./bench + - pip install -U frappe-bench --only-binary='all' - git clone https://github.com/frappe/frappe --branch $TRAVIS_BRANCH --depth 1 - bench init --skip-assets --frappe-path ~/frappe --python $(which python) frappe-bench diff --git a/FETCH_HEAD b/FETCH_HEAD new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/__init__.py b/erpnext/__init__.py index f702dc90b46..4cd5982e877 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '12.2.2' +__version__ = '12.23.0' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/fr_plan_comptable_general.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/fr_plan_comptable_general.json index da1d10deb97..21fd887bcd7 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/fr_plan_comptable_general.json +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/fr_plan_comptable_general.json @@ -72,16 +72,14 @@ "138-Autres subventions d'investissement (m\u00eame ventilation que celle du compte 131)": {}, "139-Subventions d'investissement inscrites au compte de r\u00e9sultat": { "1391-Subventions d'\u00e9quipement": { - "13911-Subventions d'\u00e9quipement": { - "13911-Etat": {}, - "13912-R\u00e9gions": {}, - "13913-D\u00e9partements": {}, - "13914-Communes": {}, - "13915-Collectivit\u00e9s publiques": {}, - "13916-Entreprises publiques": {}, - "13917-Entreprises et organismes priv\u00e9s": {}, - "13918-Autres": {} - } + "13911-Etat": {}, + "13912-R\u00e9gions": {}, + "13913-D\u00e9partements": {}, + "13914-Communes": {}, + "13915-Collectivit\u00e9s publiques": {}, + "13916-Entreprises publiques": {}, + "13917-Entreprises et organismes priv\u00e9s": {}, + "13918-Autres": {} }, "1398-Autres subventions d'investissement (m\u00eame ventilation que celle du compte 1391)": {} } @@ -536,8 +534,8 @@ "3312-Produits en cours P2": {} }, "335-Travaux en cours": { - "Travaux en cours T1": {}, - "Travaux en cours T2": {} + "3351-Travaux en cours T1": {}, + "3352-Travaux en cours T2": {} } }, "34-En-cours de production de services": { @@ -595,7 +593,9 @@ "371-Marchandises (ou groupe) A": {}, "372-Marchandises (ou groupe) B": {} }, - "38-Stocks en voie d'acheminement, mis en d\u00e9p\u00f4t ou donn\u00e9s en consignation (en cas d'inventaire permanent en comptabilit\u00e9 g\u00e9n\u00e9rale)": {}, + "38-Stocks en voie d'acheminement, mis en d\u00e9p\u00f4t ou donn\u00e9s en consignation (en cas d'inventaire permanent en comptabilit\u00e9 g\u00e9n\u00e9rale)": { + "account_type": "Stock" + }, "39-D\u00e9pr\u00e9ciations des stocks et en-cours": { "391-D\u00e9pr\u00e9ciations des mati\u00e8res premi\u00e8res (et fournitures)": { "3911-Mati\u00e8res (ou groupe) A": {}, diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/fr_plan_comptable_general_avec_code.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/fr_plan_comptable_general_avec_code.json new file mode 100644 index 00000000000..b6673795bea --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/fr_plan_comptable_general_avec_code.json @@ -0,0 +1,3144 @@ +{ + "country_code": "fr", + "name": "France - Plan Comptable General avec code", + "tree": { + "Comptes de Capitaux": { + "root_type": "Equity", + "Capital et R\u00e9serves": { + "Capital": { + "Capital souscrit - non appel\u00e9": { + "account_number": "1011" + }, + "Capital souscrit - appel\u00e9, non vers\u00e9": { + "account_number": "1012" + }, + "Capital souscrit - appel\u00e9, vers\u00e9": { + "Capital non amorti": { + "account_number": "10131" + }, + "Capital amorti": { + "account_number": "10132" + }, + "account_number": "1013" + }, + "Capital souscrit soumis \u00e0 des r\u00e9glementations particuli\u00e8res": { + "account_number": "1018" + }, + "account_number": "101" + }, + "Fonds fiduciaires": { + "account_number": "102" + }, + "Primes li\u00e9es au capital social": { + "Primes d'\u00e9mission": { + "account_number": "1041" + }, + "Primes de fusion": { + "account_number": "1042" + }, + "Primes d'apport": { + "account_number": "1043" + }, + "Primes de conversion d'obligations en actions": { + "account_number": "1044" + }, + "Bons de souscription d'actions": { + "account_number": "1045" + }, + "account_number": "104" + }, + "Ecarts de r\u00e9\u00e9valuation": { + "R\u00e9serve sp\u00e9ciale de r\u00e9\u00e9valuation": { + "account_number": "1051" + }, + "Ecart de r\u00e9\u00e9valuation libre": { + "account_number": "1052" + }, + "R\u00e9serve de r\u00e9\u00e9valuation": { + "account_number": "1053" + }, + "Ecarts de r\u00e9\u00e9valuation (autres op\u00e9rations l\u00e9gales)": { + "account_number": "1055" + }, + "Autres \u00e9carts de r\u00e9\u00e9valuation en France": { + "account_number": "1057" + }, + "Autres \u00e9carts de r\u00e9\u00e9valuation \u00e0 l'\u00e9tranger": { + "account_number": "1058" + }, + "account_number": "105" + }, + "R\u00e9serves": { + "R\u00e9serve l\u00e9gale": { + "R\u00e9serve l\u00e9gale proprement dite": { + "account_number": "10611" + }, + "Plus-values nettes \u00e0 long terme": { + "account_number": "10612" + }, + "account_number": "1061" + }, + "R\u00e9serves indisponibles": { + "account_number": "1062" + }, + "R\u00e9serves statutaires ou contractuelles": { + "account_number": "1063" + }, + "R\u00e9serves r\u00e9glement\u00e9es": { + "Plus-values nettes \u00e0 long terme": { + "account_number": "10641" + }, + "R\u00e9serves cons\u00e9cutives \u00e0 l'octroi de subventions d'investissement": { + "account_number": "10643" + }, + "Autres r\u00e9serves r\u00e9glement\u00e9es": { + "account_number": "10648" + }, + "account_number": "1064" + }, + "Autres r\u00e9serves": { + "R\u00e9serve de propre assureur": { + "account_number": "10681" + }, + "R\u00e9serves diverses": { + "account_number": "10688" + }, + "account_number": "1068" + }, + "account_number": "106" + }, + "Ecarts d'\u00e9quivalence": { + "account_number": "107" + }, + "Compte de l'exploitant": { + "account_number": "108" + }, + "Actionnaires: Capital souscrit - non appel\u00e9": { + "account_number": "109" + }, + "account_number": "10" + }, + "Report \u00e0 Nouveau": { + "Report \u00e0 nouveau (solde cr\u00e9diteur)": { + "account_number": "110" + }, + "Report \u00e0 nouveau (solde d\u00e9biteur)": { + "account_number": "119" + }, + "account_number": "11" + }, + "R\u00e9sultat de l'Exercice": { + "R\u00e9sultat de l'exercice (b\u00e9n\u00e9fice)": { + "account_number": "120" + }, + "R\u00e9sultat de l'exercice (perte)": { + "account_number": "129" + }, + "account_number": "12" + }, + "Subventions d'Investissement": { + "Subventions d'\u00e9quipement": { + "Etat": { + "account_number": "1311" + }, + "R\u00e9gions": { + "account_number": "1312" + }, + "D\u00e9partements": { + "account_number": "1313" + }, + "Communes": { + "account_number": "1314" + }, + "Collectivit\u00e9s publiques": { + "account_number": "1315" + }, + "Entreprises publiques": { + "account_number": "1316" + }, + "Entreprises et organismes priv\u00e9s": { + "account_number": "1317" + }, + "Autres": { + "account_number": "1318" + }, + "account_number": "131" + }, + "Autres subventions d'investissement (m\u00eame ventilation que celle du compte 131)": { + "account_number": "138" + }, + "Subventions d'investissement inscrites au compte de r\u00e9sultat": { + "Subventions d'\u00e9quipement": { + "Etat": { + "account_number": "13911" + }, + "R\u00e9gions": { + "account_number": "13912" + }, + "D\u00e9partements": { + "account_number": "13913" + }, + "Communes": { + "account_number": "13914" + }, + "Collectivit\u00e9s publiques": { + "account_number": "13915" + }, + "Entreprises publiques": { + "account_number": "13916" + }, + "Entreprises et organismes priv\u00e9s": { + "account_number": "13917" + }, + "Autres": { + "account_number": "13918" + }, + "account_number": "1391" + }, + "Autres subventions d'investissement (m\u00eame ventilation que celle du compte 1391)": { + "account_number": "1398" + }, + "account_number": "139" + }, + "account_number": "13" + }, + "Provisions R\u00e9glement\u00e9es": { + "Provisions r\u00e9glement\u00e9es relative aux immobilisations": { + "Provisions pour reconstitution des gisements miniers et p\u00e9troliers": { + "account_number": "1423" + }, + "Provisions pour investissement (participation des salari\u00e9s)": { + "account_number": "1424" + }, + "account_number": "142" + }, + "Provisions r\u00e9glement\u00e9es relatives aux stocks": { + "Hausse des prix": { + "account_number": "1431" + }, + "Fluctuation des cours": { + "account_number": "1432" + }, + "account_number": "143" + }, + "Provisions r\u00e9glement\u00e9es relatives aux autres \u00e9l\u00e9ments de l'actif": { + "account_number": "144" + }, + "Amortissements d\u00e9rogatoires": { + "account_number": "145" + }, + "Provision sp\u00e9ciale de r\u00e9\u00e9valuation": { + "account_number": "146" + }, + "Plus-values r\u00e9investies": { + "account_number": "147" + }, + "Autres provisions r\u00e9glement\u00e9es": { + "account_number": "148" + }, + "account_number": "14" + }, + "Provisions": { + "Provisions pour risques": { + "Provisions pour litiges": { + "account_number": "1511" + }, + "Provisions pour garanties donn\u00e9es aux clients": { + "account_number": "1512" + }, + "Provisions pour pertes sur march\u00e9s \u00e0 terme": { + "account_number": "1513" + }, + "Provisions pour amendes et p\u00e9nalit\u00e9s": { + "account_number": "1514" + }, + "Provisions pour pertes de change": { + "account_number": "1515" + }, + "Provisions pour pertes sur contrats": { + "account_number": "1516" + }, + "Autres provisions pour risques": { + "account_number": "1518" + }, + "account_number": "151" + }, + "Provisions pour pensions et obligations similaires": { + "account_number": "153" + }, + "Provisions pour restructurations": { + "account_number": "154" + }, + "Provisions pour imp\u00f4ts": { + "account_number": "155" + }, + "Provisions pour renouvellement des immobilisations (entreprises concessionnaires) ": { + "account_number": "156" + }, + "Provisions pour charges \u00e0 r\u00e9partir sur plusieurs exercices": { + "Provisions pour gros entretien ou grandes r\u00e9visions": { + "account_number": "1572" + }, + "account_number": "157" + }, + "Autres provisions pour charges": { + "Provisions pour remises en \u00e9tat": { + "account_number": "1581" + }, + "account_number": "158" + }, + "account_number": "15" + }, + "Emprunts et Dettes Assimil\u00e9es": { + "Emprunts obligataires convertibles": { + "account_number": "161" + }, + "Obligations repr\u00e9sentatives de passifs nets remis en fiducie": { + "account_number": "162" + }, + "Autres emprunts obligataires": { + "account_number": "163" + }, + "Emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "164" + }, + "D\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "D\u00e9p\u00f4ts": { + "account_number": "1651" + }, + "Cautionnements": { + "account_number": "1655" + }, + "account_number": "165" + }, + "Participation des salari\u00e9s aux r\u00e9sultats": { + "Comptes bloqu\u00e9s": { + "account_number": "1661" + }, + "Fonds de participation": { + "account_number": "1662" + }, + "account_number": "166" + }, + "Emprunts et dettes assortis de conditions particuli\u00e8res": { + "Emissions de titres participatifs": { + "account_number": "1671" + }, + "Avances conditionn\u00e9es de l'Etat": { + "account_number": "1674" + }, + "Emprunts participatifs": { + "account_number": "1675" + }, + "account_number": "167" + }, + "Autres emprunts et dettes assimil\u00e9es": { + "Autres emprunts": { + "account_number": "1681" + }, + "Rentes viag\u00e8res capitalis\u00e9es": { + "account_number": "1685" + }, + "Autres dettes": { + "account_number": "1687" + }, + "Int\u00e9r\u00eats courus": { + "Int\u00e9r\u00eats courus sur emprunts obligataires convertibles": { + "account_number": "16881" + }, + "Int\u00e9r\u00eats courus sur autres emprunts obligataires": { + "account_number": "16883" + }, + "Int\u00e9r\u00eats courus sur emprunts aupr\u00e8s des \u00e9tablissements de cr\u00e9dit": { + "account_number": "16884" + }, + "Int\u00e9r\u00eats courus sur d\u00e9p\u00f4ts et cautionnements re\u00e7us": { + "account_number": "16885" + }, + "Int\u00e9r\u00eats courus sur participation des salari\u00e9s aux r\u00e9sultats": { + "account_number": "16886" + }, + "Int\u00e9r\u00eats courus sur emprunts et dettes assortis de conditions particuli\u00e8res": { + "account_number": "16887" + }, + "Int\u00e9r\u00eats courus sur autres emprunts et dettes assimil\u00e9es": { + "account_number": "16888" + }, + "account_number": "1688" + }, + "Primes de remboursement des obligations": { + "account_number": "169" + }, + "account_number": "168" + }, + "account_number": "16" + }, + "Dettes Rattach\u00e9es \u00e0 des Participations": { + "Dettes rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "171" + }, + "Dettes rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "174" + }, + "Dettes rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "Principal": { + "account_number": "1781" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "1788" + }, + "account_number": "178" + }, + "account_number": "17" + }, + "Comptes de liaison des \u00e9tablisssements et soci\u00e9t\u00e9s en participation": { + "Comptes de liaison des \u00e9tablissements": { + "account_number": "181" + }, + "Biens et prestations de services \u00e9chang\u00e9s entre \u00e9tablissements (charges)": { + "account_number": "186" + }, + "Biens et prestations de services \u00e9chang\u00e9s entre \u00e9tablissements (produits)": { + "account_number": "187" + }, + "Comptes de liaison des soci\u00e9t\u00e9s en participation": { + "account_number": "188" + }, + "account_number": "18" + }, + "account_number": "1" + }, + "Comptes d'Immobilisations": { + "root_type": "Asset", + "Immobilisations incorporelles": { + "Frais \u00e9tablissement": { + "Frais de constitution": { + "account_number": "2011" + }, + "Frais de premier \u00e9tablissement": { + "Frais de prospection": { + "account_number": "20121" + }, + "Frais de publicit\u00e9": { + "account_number": "20122" + }, + "account_number": "2012" + }, + "Frais d'augmentation de capital et d'op\u00e9rations diverses (fusions, scissions, transformations)": { + "account_number": "2013" + }, + "account_number": "201" + }, + "Frais de recherche et de d\u00e9veloppement": { + "account_number": "203" + }, + "Concessions et droits similaires, brevets, licences, marques, proc\u00e9d\u00e9s, logiciels, droits et valeurs similaires": { + "account_number": "205" + }, + "Droit au bail": { + "account_number": "206" + }, + "Fonds commercial": { + "account_number": "207" + }, + "Autres immobilisations incorporelles": { + "Mali de fusion sur actifs incorporels": { + "account_number": "2081" + }, + "account_number": "208" + }, + "account_number": "20" + }, + "Immobilisations corporelles": { + "account_type": "Fixed Asset", + "Terrains": { + "account_type": "Fixed Asset", + "Terrains nus": { + "account_type": "Fixed Asset", + "account_number": "2111" + }, + "Terrains am\u00e9nag\u00e9s": { + "account_type": "Fixed Asset", + "account_number": "2112" + }, + "Sous-sols et sur-sols": { + "account_type": "Fixed Asset", + "account_number": "2113" + }, + "Terrains de carri\u00e8res (tr\u00e9fonds)": { + "account_type": "Fixed Asset", + "account_number": "2114" + }, + "Terrains b\u00e2tis": { + "account_type": "Fixed Asset", + "Ensembles immobiliers industriels (A, B)": { + "account_type": "Fixed Asset", + "account_number": "21151" + }, + "Ensembles immobiliers administratifs et commerciaux (A, B)": { + "account_type": "Fixed Asset", + "account_number": "21155" + }, + "Autres ensembles immobiliers": { + "account_type": "Fixed Asset", + "Autres ensembles immobiliers affect\u00e9s aux op\u00e9rations professionnelles (A, B)": { + "account_type": "Fixed Asset", + "account_number": "211581" + }, + "Autres ensembles immobiliers affect\u00e9s aux op\u00e9rations non professionnelles (A, B)": { + "account_type": "Fixed Asset", + "account_number": "211588" + }, + "account_number": "21158" + }, + "account_number": "2115" + }, + "account_number": "211" + }, + "Agencements et am\u00e9nagements de terrains (m\u00eame ventilation que celle du compte 211)": { + "account_type": "Fixed Asset", + "account_number": "212" + }, + "Constructions": { + "account_type": "Fixed Asset", + "B\u00e2timents": { + "account_type": "Fixed Asset", + "Ensembles immobiliers industriels (A, B)": { + "account_type": "Fixed Asset", + "account_number": "21311" + }, + "Ensembles immobiliers administratifs et commerciaux (A, B)": { + "account_type": "Fixed Asset", + "account_number": "21315" + }, + "Autres ensembles immobiliers": { + "account_type": "Fixed Asset", + "Autres ensembles immobiliers affect\u00e9s aux op\u00e9rations professionnelles (A, B)": { + "account_type": "Fixed Asset", + "account_number": "213181" + }, + "Autres ensembles immobiliers affect\u00e9s aux op\u00e9rations non professionnelles (A, B)": { + "account_type": "Fixed Asset", + "account_number": "213188" + }, + "account_number": "21318" + }, + "account_number": "2131" + }, + "Installations g\u00e9n\u00e9rales, agencements, am\u00e9nagements des constructions": { + "account_type": "Fixed Asset", + "Ensembles immobiliers industriels (A, B)": { + "account_type": "Fixed Asset", + "account_number": "21351" + }, + "Ensembles immobiliers administratifs et commerciaux (A, B)": { + "account_type": "Fixed Asset", + "account_number": "21355" + }, + "Autres ensembles immobiliers": { + "account_type": "Fixed Asset", + "Autres ensembles immobiliers affect\u00e9s aux op\u00e9rations professionnelles (A, B)": { + "account_type": "Fixed Asset", + "account_number": "213581" + }, + "Autres ensembles immobiliers affect\u00e9s aux op\u00e9rations non professionnelles (A, B)": { + "account_type": "Fixed Asset", + "account_number": "213588" + }, + "account_number": "21358" + }, + "account_number": "2135" + }, + "Ouvrages d'infrastructure": { + "account_type": "Fixed Asset", + "Voies de terre": { + "account_type": "Fixed Asset", + "account_number": "21381" + }, + "Voies de fer": { + "account_type": "Fixed Asset", + "account_number": "21382" + }, + "Voies d'eau": { + "account_type": "Fixed Asset", + "account_number": "21383" + }, + "Barrages": { + "account_type": "Fixed Asset", + "account_number": "21384" + }, + "Pistes d'a\u00e9rodromes": { + "account_type": "Fixed Asset", + "account_number": "21385" + }, + "account_number": "2138" + }, + "account_number": "213" + }, + "Constructions sur sol d'autrui (m\u00eame ventilation que celle du compte 213)": { + "account_type": "Fixed Asset", + "account_number": "214" + }, + "Installations techniques, mat\u00e9riel et outillage industriels": { + "account_type": "Fixed Asset", + "Installations complexes sp\u00e9cialis\u00e9es": { + "account_type": "Fixed Asset", + "Installations complexes sp\u00e9cialis\u00e9es - sur sol propre": { + "account_type": "Fixed Asset", + "account_number": "21511" + }, + "Installations complexes sp\u00e9cialis\u00e9es - sur sol d'autrui": { + "account_type": "Fixed Asset", + "account_number": "21514" + }, + "account_number": "2151" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique": { + "account_type": "Fixed Asset", + "Installations \u00e0 caract\u00e8re sp\u00e9cifique - sur sol propre": { + "account_type": "Fixed Asset", + "account_number": "21531" + }, + "Installations \u00e0 caract\u00e8re sp\u00e9cifique - sur sol d'autrui": { + "account_type": "Fixed Asset", + "account_number": "21534" + }, + "account_number": "2153" + }, + "Mat\u00e9riel industriel": { + "account_type": "Fixed Asset", + "account_number": "2154" + }, + "Outillage industriel": { + "account_type": "Fixed Asset", + "account_number": "2155" + }, + "Agencements et am\u00e9nagements du mat\u00e9riel et outillage industriel": { + "account_type": "Fixed Asset", + "account_number": "2157" + }, + "account_number": "215" + }, + "Autres immobilisations corporelles": { + "account_type": "Fixed Asset", + "Installations g\u00e9n\u00e9rales, agencements, am\u00e9nagements divers": { + "account_type": "Fixed Asset", + "account_number": "2181" + }, + "Mat\u00e9riel de transport": { + "account_type": "Fixed Asset", + "account_number": "2182" + }, + "Mat\u00e9riel de bureau et mat\u00e9riel informatique": { + "account_type": "Fixed Asset", + "account_number": "2183" + }, + "Mobilier": { + "account_type": "Fixed Asset", + "account_number": "2184" + }, + "Cheptel": { + "account_type": "Fixed Asset", + "account_number": "2185" + }, + "Emballages r\u00e9cup\u00e9rables": { + "account_type": "Fixed Asset", + "account_number": "2186" + }, + "Mali de fusion sur actifs corporels": { + "account_number": "2187" + }, + "account_number": "218" + }, + "account_number": "21" + }, + "Immobilisations mises en concession": { + "account_number": "22" + }, + "Immobilisations en cours": { + "Immobilisations corporelles en cours": { + "Terrains": { + "account_number": "2312" + }, + "Constructions": { + "account_number": "2313" + }, + "Installations techniques, mat\u00e9riel et outillage industriels": { + "account_number": "2315" + }, + "Autres immobilisations corporelles": { + "account_number": "2318" + }, + "account_number": "231" + }, + "Immobilisations incorporelles en cours": { + "account_number": "232" + }, + "Avances et acomptes vers\u00e9s sur commandes d'immobilisations incorporelles": { + "account_number": "237" + }, + "Avances et acomptes vers\u00e9s sur commandes d'immobilisations corporelles": { + "Terrains": { + "account_number": "2382" + }, + "Constructions": { + "account_number": "2383" + }, + "Installations techniques, mat\u00e9riel et outillage industriels": { + "account_number": "2385" + }, + "Autres immobilisations corporelles": { + "account_number": "2388" + }, + "account_number": "238" + }, + "account_number": "23" + }, + "Parts dans des entreprises li\u00e9es et cr\u00e9ances sur des entreprises li\u00e9es": { + "is_group": 1, + "account_number": "25" + }, + "Participations et cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "Titres de participation": { + "Actions": { + "account_number": "2611" + }, + "Autres titres": { + "account_number": "2618" + }, + "account_number": "261" + }, + "Autres formes de participation": { + "Droit repr\u00e9sentatifs d'actifs nets remis en fiducie": { + "account_number": "2661" + }, + "account_number": "266" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (groupe)": { + "account_number": "2671" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (hors groupe)": { + "account_number": "2674" + }, + "Versements repr\u00e9sentatifs d'apports non capitalis\u00e9s (appel de fonds)": { + "account_number": "2675" + }, + "Avances consolidables": { + "account_number": "2676" + }, + "Autres cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "2677" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "2678" + }, + "account_number": "267" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation": { + "Principal": { + "account_number": "2681" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "2688" + }, + "account_number": "268" + }, + "Versements restant \u00e0 effectuer sur titres de participation non lib\u00e9r\u00e9s": { + "account_number": "269" + }, + "account_number": "26" + }, + "Autres immobilisations financi\u00e8res": { + "Titres immobilis\u00e9s autres que les titres immobilis\u00e9s de l'activit\u00e9 de portefeuille (droit de propri\u00e9t\u00e9)": { + "Actions": { + "account_number": "2711" + }, + "Autres titres": { + "account_number": "2718" + }, + "account_number": "271" + }, + "Titres immobilis\u00e9s (droit de cr\u00e9ance)": { + "Obligations": { + "account_number": "2721" + }, + "Bons": { + "account_number": "2722" + }, + "account_number": "272" + }, + "Titres immobilis\u00e9s de l'activit\u00e9 de portefeuille": { + "account_number": "273" + }, + "Pr\u00eats": { + "Pr\u00eats participatifs": { + "account_number": "2741" + }, + "Pr\u00eats aux associ\u00e9s": { + "account_number": "2742" + }, + "Pr\u00eats au personnel": { + "account_number": "2743" + }, + "Autres pr\u00eats": { + "account_number": "2748" + }, + "account_number": "274" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s": { + "D\u00e9p\u00f4ts": { + "account_number": "2751" + }, + "Cautionnements": { + "account_number": "2755" + }, + "account_number": "275" + }, + "Autres cr\u00e9ances immobilis\u00e9es": { + "Cr\u00e9ances diverses": { + "account_number": "2761" + }, + "Int\u00e9r\u00eats courus": { + "Int\u00e9r\u00eats courus sur titres immobilis\u00e9s (droit de cr\u00e9ance)": { + "account_number": "27682" + }, + "Int\u00e9r\u00eats courus sur pr\u00eats": { + "account_number": "27684" + }, + "Int\u00e9r\u00eats courus sur d\u00e9p\u00f4ts et cautionnements": { + "account_number": "27685" + }, + "Int\u00e9r\u00eats courus sur cr\u00e9ances diverses": { + "account_number": "27688" + }, + "account_number": "2768" + }, + "account_number": "276" + }, + "(Actions propres ou parts propres)": { + "Actions propres ou parts propres": { + "account_number": "2771" + }, + "Actions propres ou parts propres en voie d'annulation": { + "account_number": "2772" + }, + "account_number": "277" + }, + "Mali de fusion sur actifs financiers": { + "account_number": "278" + }, + "Versements restant \u00e0 effectuer sur titres immobilis\u00e9s non lib\u00e9r\u00e9s": { + "account_number": "279" + }, + "account_number": "27" + }, + "Amortissements des immobilisations": { + "account_type": "Accumulated Depreciation", + "Amortissements des immobilisations incorporelles": { + "account_type": "Accumulated Depreciation", + "Frais d'\u00e9tablissement (m\u00eame ventilation que celle du compte 212)": { + "account_type": "Accumulated Depreciation", + "account_number": "2801" + }, + "Frais de recherche et de d\u00e9veloppement": { + "account_type": "Accumulated Depreciation", + "account_number": "2803" + }, + "Concessions et droits similaires, brevets, licences, logiciels, droits et valeurs similaires": { + "account_type": "Accumulated Depreciation", + "account_number": "2805" + }, + "Fonds commercial": { + "account_type": "Accumulated Depreciation", + "account_number": "2807" + }, + "Autres immobilisations incorporelles": { + "account_type": "Accumulated Depreciation", + "Mali de fusion sur actifs incorporels": { + "account_type": "Accumulated Depreciation", + "account_number": "28081" + }, + "account_number": "2808" + }, + "account_number": "280" + }, + "Amortissements des immobilisations corporelles": { + "account_type": "Accumulated Depreciation", + "Terrains de gisement": { + "account_type": "Accumulated Depreciation", + "account_number": "2811" + }, + "Agencements, am\u00e9nagements de terrains (m\u00eame ventilation que celle du compte 212)": { + "account_type": "Accumulated Depreciation", + "account_number": "2812" + }, + "Constructions (m\u00eame ventilation que celle du compte 213)": { + "account_type": "Accumulated Depreciation", + "account_number": "2813" + }, + "Constructions sur sol d'autrui (m\u00eame ventilation que celle du compte du 214)": { + "account_type": "Accumulated Depreciation", + "account_number": "2814" + }, + "Installations techniques, mat\u00e9riel et outillage industriels (m\u00eame ventilation que celle du compte 218)": { + "account_type": "Accumulated Depreciation", + "account_number": "2815" + }, + "Autres immobilisations corporelles (m\u00eame ventilation que celle du compte 218)": { + "account_type": "Accumulated Depreciation", + "Mali de fusion sur actifs corporels": { + "account_type": "Accumulated Depreciation", + "account_number": "28187" + }, + "account_number": "2818" + }, + "account_number": "281" + }, + "Amortissements des immobilisations mises en concession": { + "account_number": "282" + }, + "account_number": "28" + }, + "D\u00e9pr\u00e9ciations des immobilisations": { + "D\u00e9pr\u00e9ciations des immobilisations incorporelles": { + "Marques, proc\u00e9d\u00e9s, droits et valeurs similaires": { + "account_number": "2905" + }, + "Droit au bail": { + "account_number": "2906" + }, + "Fonds commercial": { + "account_number": "2907" + }, + "Autres immobilisations incorporelles": { + "Mali de fusion sur actifs incorporels": { + "account_number": "29081" + }, + "account_number": "2908" + }, + "account_number": "290" + }, + "D\u00e9pr\u00e9ciations des immobilisations corporelles (m\u00eame ventilation que celle du compte 21)": { + "Terrains (autres que terrains de gisement)": { + "Mali de fusion sur actifs corporels": { + "account_number": "29187" + }, + "account_number": "2911" + }, + "account_number": "291" + }, + "D\u00e9pr\u00e9ciations des immobilisations mises en concession": { + "account_number": "292" + }, + "D\u00e9pr\u00e9ciations des immobilisations en cours": { + "Immobilisations corporelles en cours": { + "account_number": "2931" + }, + "Immobilisations incorporelles en cours": { + "account_number": "2932" + }, + "account_number": "293" + }, + "D\u00e9pr\u00e9ciations des participations et cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "Titres de participation": { + "account_number": "2961" + }, + "Autres formes de participation": { + "account_number": "2966" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des participations (m\u00eame ventilation que celle du compte 267)": { + "account_number": "2967" + }, + "Cr\u00e9ances rattach\u00e9es \u00e0 des soci\u00e9t\u00e9s en participation (m\u00eame ventilation que celle du compte 268)": { + "account_number": "2968" + }, + "account_number": "296" + }, + "D\u00e9pr\u00e9ciations des autres immobilisations financi\u00e8res": { + "Titres immobilis\u00e9s autres que les titres immobilis\u00e9s de l'activit\u00e9 de portefeuille - droit de propri\u00e9t\u00e9": { + "account_number": "2971" + }, + "Titres immobilis\u00e9s - droit de cr\u00e9ance (m\u00eame ventilation que celle du compte 272)": { + "account_number": "2972" + }, + " Titres immobilis\u00e9s de l'activit\u00e9 de portefuille": { + "account_number": "2973" + }, + "Pr\u00eats (m\u00eame ventilation que celle du compte 274)": { + "account_number": "2974" + }, + "D\u00e9p\u00f4ts et cautionnements vers\u00e9s (m\u00eame ventilation que celle du compte 275)": { + "account_number": "2975" + }, + "Autres cr\u00e9ances immobilis\u00e9es (m\u00eame ventilation que celle du compte 276)": { + "Mali de fusion sur actifs financiers": { + "account_number": "29787" + }, + "account_number": "2976" + }, + "account_number": "297" + }, + "account_number": "29" + }, + "account_number": "2" + }, + "Comptes de Stocks et En-Cours": { + "root_type": "Asset", + "Mati\u00e8res premi\u00e8res (et fournitures)": { + "Mati\u00e8res (ou groupe) A": { + "account_number": "311" + }, + "Mati\u00e8res (ou groupe) B": { + "account_number": "312" + }, + "Fournitures A, B, C, ...": { + "account_number": "317" + }, + "account_number": "31" + }, + "Autres approvisionnements": { + "Mat\u00e8res consommables": { + "Mati\u00e8res (ou groupe) C": { + "account_number": "3211" + }, + "Mati\u00e8res (ou groupe) D": { + "account_number": "3212" + }, + "account_number": "321" + }, + "Fournitures consommables": { + "Combustibles": { + "account_number": "3221" + }, + "Produits d'entretien": { + "account_number": "3222" + }, + "Fournitures d'atelier et d'usine": { + "account_number": "3223" + }, + "Fournitures de magasin": { + "account_number": "3224" + }, + "Fournitures de bureau": { + "account_number": "3225" + }, + "account_number": "322" + }, + "Emballages": { + "Emballages perdus": { + "account_number": "3261" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_number": "3265" + }, + "Emballages \u00e0 usage mixte": { + "account_number": "3267" + }, + "account_number": "326" + }, + "account_number": "32" + }, + "En-cours de production de biens": { + "Produits en cours": { + "Produits en cours P1": { + "account_number": "3311" + }, + "Produits en cours P2": { + "account_number": "3312" + }, + "account_number": "331" + }, + "Travaux en cours": { + "Travaux en cours T1": { + "account_number": "3351" + }, + "Travaux en cours T2": { + "account_number": "3352" + }, + "account_number": "335" + }, + "account_number": "33" + }, + "En-cours de production de services": { + "Etudes en cours": { + "Etudes en cours E1": { + "account_number": "3411" + }, + "Etudes en cours E2": { + "account_number": "3412" + }, + "account_number": "341" + }, + "Prestations de services en cours": { + "Prestations de services S1": { + "account_number": "3451" + }, + "Prestations de services S2": { + "account_number": "3452" + }, + "account_number": "345" + }, + "account_number": "34" + }, + "Stocks de produits": { + "account_type": "Stock", + "Produits interm\u00e9diaires": { + "account_type": "Stock", + "Produits interm\u00e9diaires (ou groupe) A": { + "account_type": "Stock", + "is_group": 1, + "account_number": "3511" + }, + "Produits interm\u00e9diaires (ou groupe) B": { + "account_type": "Stock", + "is_group": 1, + "account_number": "3512" + }, + "account_number": "351" + }, + "Produits finis": { + "account_type": "Stock", + "Produits finis (ou groupe) A": { + "account_type": "Stock", + "is_group": 1, + "account_number": "3551" + }, + "Produits finis (ou groupe) B": { + "account_type": "Stock", + "is_group": 1, + "account_number": "3552" + }, + "account_number": "355" + }, + "Produits r\u00e9siduels (ou mati\u00e8res de r\u00e9cup\u00e9ration)": { + "account_type": "Stock", + "D\u00e9chets": { + "account_type": "Stock", + "is_group": 1, + "account_number": "3581" + }, + "Rebuts": { + "account_type": "Stock", + "is_group": 1, + "account_number": "3585" + }, + "Mati\u00e8res de r\u00e9cup\u00e9ration": { + "account_type": "Stock", + "is_group": 1, + "account_number": "3586" + }, + "account_number": "358" + }, + "account_number": "35" + }, + "(Compte \u00e0 ouvrir, le cas \u00e9ch\u00e9ant, sous l'intitul\u00e9 \"stocks provenant d'immobilisations\")": { + "account_number": "36" + }, + "Stocks de marchandises": { + "Marchandises (ou groupe) A": { + "account_number": "371" + }, + "Marchandises (ou groupe) B": { + "account_number": "372" + }, + "account_number": "37" + }, + "Stocks en voie d'acheminement, mis en d\u00e9p\u00f4t ou donn\u00e9s en consignation (en cas d'inventaire permanent en comptabilit\u00e9 g\u00e9n\u00e9rale)": { + "account_type": "Stock", + "account_number": "38" + }, + "D\u00e9pr\u00e9ciations des stocks et en-cours": { + "D\u00e9pr\u00e9ciations des mati\u00e8res premi\u00e8res (et fournitures)": { + "Mati\u00e8res (ou groupe) A": { + "account_number": "3911" + }, + "Mati\u00e8res (ou groupe) B": { + "account_number": "3912" + }, + "Fournitures A, B, C, ...": { + "account_number": "3917" + }, + "account_number": "391" + }, + "D\u00e9pr\u00e9ciations des autres approvisionnements": { + "Mati\u00e8res consommables (m\u00eame ventilation que celle du compte 321)": { + "account_number": "3921" + }, + "Fournitures consommables (m\u00eame ventilation que celle du compte 322)": { + "account_number": "3922" + }, + "Emballages (m\u00eame ventilation que celle du compte 326)": { + "account_number": "3926" + }, + "account_number": "392" + }, + "D\u00e9pr\u00e9ciations des en-cours de production de biens": { + "Etudes en cours (m\u00eame ventilation que celle du compte 341)": { + "account_number": "3931" + }, + "Travaux en cours (m\u00eame ventilation que celle du compte 335)": { + "account_number": "3935" + }, + "account_number": "393" + }, + "D\u00e9pr\u00e9ciations des en-cours de production de services": { + "Etudes en cours (m\u00eame ventilation que celle du compte 341)": { + "account_number": "3941" + }, + "Prestations de services en cours (m\u00eame ventilation que celle du compte 345)": { + "account_number": "3945" + }, + "account_number": "394" + }, + "D\u00e9pr\u00e9ciations des stocks de produits": { + "Produits interm\u00e9diaires (m\u00eame ventilation que celle du compte 351)": { + "account_number": "3951" + }, + "Produits finis (m\u00eame ventilation que celle du compte 355)": { + "account_number": "3955" + }, + "account_number": "395" + }, + "D\u00e9pr\u00e9ciations des stocks de marchandises": { + "Marchandise (ou groupe) A": { + "account_number": "3971" + }, + "Marchandise (ou groupe) B": { + "account_number": "3972" + }, + "account_number": "397" + }, + "account_number": "39" + }, + "account_number": "3" + }, + "4-Comptes de Tiers (ACTIF)": { + "root_type": "Asset", + "40-Fournisseurs et Comptes Rattach\u00e9s (ACTIF)": { + "Fournisseurs d\u00e9biteurs": { + "Fournisseurs - Avances et acomptes vers\u00e9s sur commandes": { + "account_number": "4091" + }, + "Fournisseurs - Cr\u00e9ances pour emballages et mat\u00e9riel \u00e0 rendre": { + "account_number": "4096" + }, + "Fournisseurs - Autres avoirs": { + "Fournisseurs d'exploitation": { + "account_number": "40971" + }, + "Fournisseurs d'immobilisation": { + "account_number": "40974" + }, + "account_number": "4097" + }, + "Rabais, remises, ristournes \u00e0 obtenir et autres avoirs non encore re\u00e7us": { + "account_number": "4098" + }, + "account_number": "409" + } + }, + "41-Clients et comptes rattach\u00e9s (ACTIF)": { + "account_type": "Receivable", + "Clients et Comptes rattach\u00e9s": { + "account_type": "Receivable", + "account_number": "410" + }, + "Clients": { + "account_type": "Receivable", + "Clients - Ventes de biens ou de prestations de services": { + "account_type": "Receivable", + "account_number": "4111" + }, + "Clients - Retenues de garantie": { + "account_type": "Receivable", + "account_number": "4117" + }, + "account_number": "411" + }, + "Clients - Effets \u00e0 recevoir": { + "account_type": "Receivable", + "account_number": "413" + }, + "Clients douteux ou litigieux": { + "account_type": "Receivable", + "account_number": "416" + }, + "Clients - Produits non encore factur\u00e9s": { + "account_type": "Receivable", + "Clients - Factures \u00e0 \u00e9tablir": { + "account_type": "Receivable", + "account_number": "4181" + }, + "Clients - Int\u00e9r\u00eats courus": { + "account_type": "Receivable", + "account_number": "4188" + }, + "account_number": "418" + } + }, + "42-Personnel et comptes rattach\u00e9s (ACTIF)": { + "Personnel - Avances et acomptes": { + "account_number": "425" + } + }, + "43-S\u00e9curit\u00e9 sociale et autres organismes sociaux (ACTIF)": { + "S\u00e9curit\u00e9 sociale": { + "account_number": "431" + }, + "Autres organismes sociaux": { + "account_number": "437" + }, + "438-Organismes sociaux - Produits \u00e0 recevoir": { + "Produits \u00e0 recevoir": { + "account_number": "4387" + } + } + }, + "44-Etat et autres collectivit\u00e9s publiques (ACTIF)": { + "Etat - Subventions \u00e0 recevoir": { + "Subventions d'investissement": { + "account_number": "4411" + }, + "Subventions d'exploitation": { + "account_number": "4417" + }, + "Subventions d'\u00e9quilibre": { + "account_number": "4418" + }, + "Avances sur subventions": { + "account_number": "4419" + }, + "account_number": "441" + }, + "Op\u00e9rations particuli\u00e8res avec l'Etat, les collectivit\u00e9s publiques, les organismes internationaux": { + "Cr\u00e9ances sur l'Etat r\u00e9sultant de la suppression de la r\u00e8gle du d\u00e9calage d'un mois en mati\u00e8re de TVA": { + "account_number": "4431" + }, + "Int\u00e9r\u00eats courus sur cr\u00e9ances figurant au compte 4431": { + "account_number": "4438" + }, + "account_number": "443" + }, + "Etat - Taxes sur le chiffre d'affaires (ACTIF)": { + "TVA due intracommunautaire": { + "account_number": "4452" + }, + "Taxes sur le chiffre d'affaires d\u00e9ductibles": { + "TVA sur immobilisations": { + "account_number": "44562" + }, + "TVA transf\u00e9r\u00e9e par d'autres entreprises": { + "account_number": "44563" + }, + "TVA sur autres biens et services": { + "tax_rate": 20, + "account_number": "44566" + }, + "Cr\u00e9dit de TVA \u00e0 reporter": { + "account_number": "44567" + }, + "Taxes assimil\u00e9es \u00e0 la TVA": { + "account_number": "44568" + }, + "account_number": "4456" + }, + "4458-Taxes sur le chiffre d'affaires \u00e0 r\u00e9gulariser ou en attente (ACTIF)": { + "Acomptes - R\u00e9gime simplifi\u00e9 d'imposition": { + "account_number": "44581" + }, + "Acomptes - R\u00e9gime du forfait": { + "account_number": "44582" + }, + "Remboursement de taxes sur le chiffre d'affaires demand\u00e9": { + "account_number": "44583" + }, + "Taxes sur le chiffre d'affaires sur factures non parvenues": { + "account_number": "44586" + } + } + }, + "Etat - Charges \u00e0 payer et produits \u00e0 recevoir": { + "Charges fiscales sur cong\u00e9s \u00e0 payer": { + "account_number": "4482" + }, + "Charges \u00e0 payer": { + "account_number": "4486" + }, + "Produits \u00e0 recevoir": { + "account_number": "4487" + }, + "account_number": "448" + } + }, + "45-Groupe et associ\u00e9s (ACTIF)": { + "Associ\u00e9s - Op\u00e9rations sur le capital (ACTIF)": { + "456-Apporteurs - Capital appel\u00e9, non vers\u00e9": { + "Actionnaires - Capital souscrit et appel\u00e9, non vers\u00e9": { + "account_number": "45621" + }, + "Associ\u00e9s - Capital appel\u00e9, non vers\u00e9": { + "account_number": "45625" + }, + "account_number": "4562" + } + } + }, + "46-D\u00e9biteurs divers et cr\u00e9diteurs divers (ACTIF)": { + "Cr\u00e9ances sur cessions d'immobilisations": { + "account_number": "462" + }, + "Cr\u00e9ances sur cessions de valeurs mobili\u00e8res de placement": { + "account_number": "465" + }, + "467-Autres comptes d\u00e9biteurs ou cr\u00e9diteurs (ACTIF)": {}, + "468-Divers - Charges \u00e0 payer et produits \u00e0 recevoir (ACTIF)": { + "Produits \u00e0 recevoir": { + "account_number": "4687" + } + } + }, + "47-Comptes transitoires ou d'attente (ACTIF)": { + "471-Comptes d'attente (ACTIF)": { + "account_type": "Temporary" + }, + "Diff\u00e9rences de conversion (ACTIF)": { + "Diminution des cr\u00e9ances": { + "account_number": "4761" + }, + "Augmentation des dettes": { + "account_number": "4762" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4768" + }, + "account_number": "476" + }, + "Autres comptes transitoires (ACTIF)": { + "Mali de fusion sur actif circulant": { + "account_number": "4781" + }, + "478-Diff\u00e9rences d'\u00e9valuation sur instruments de tr\u00e9sorerie (ACTIF)": { + "account_number": "4786" + } + } + }, + "48-Comptes de r\u00e9gularisation (ACTIF)": { + "Charges \u00e0 r\u00e9partir sur plusieurs exercices": { + "Frais d'\u00e9mission des emprunts": { + "account_number": "4816" + }, + "account_number": "481" + }, + "Charges constat\u00e9es d'avance": { + "account_number": "486" + }, + "488-Comptes de r\u00e9partition p\u00e9riodique des charges et des produits (ACTIF)": { + "Charges": { + "account_number": "4886" + } + } + }, + "49-D\u00e9pr\u00e9ciation des comptes de tiers (ACTIF)": { + "D\u00e9pr\u00e9ciations des comptes clients": { + "account_number": "491" + }, + "D\u00e9pr\u00e9ciations des comptes du groupe et des associ\u00e9s": { + "Comptes du groupe": { + "account_number": "4951" + }, + "Comptes courants des associ\u00e9s": { + "account_number": "4955" + }, + "Op\u00e9rations faites en commun et en GIE": { + "account_number": "4958" + }, + "account_number": "495" + }, + "D\u00e9pr\u00e9ciations des comptes de d\u00e9biteurs divers": { + "Cr\u00e9ances sur cessions d'immobilisations": { + "account_number": "4962" + }, + "Cr\u00e9ances sur cessions de valeurs mobili\u00e8res de placement": { + "account_number": "4965" + }, + "Autres comptes d\u00e9biteurs": { + "account_number": "4967" + }, + "account_number": "496" + } + } + }, + "4-Comptes de Tiers (PASSIF)": { + "root_type": "Liability", + "40-Fournisseurs et Comptes Rattach\u00e9s (PASSIF)": { + "account_type": "Payable", + "Fournisseurs": { + "account_type": "Payable", + "Fournisseurs - Achats de biens ou de prestations de services": { + "account_type": "Payable", + "account_number": "4011" + }, + "Fournisseurs - Retenues de garantie": { + "account_type": "Payable", + "account_number": "4017" + }, + "account_number": "401" + }, + "Fournisseurs - Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "403" + }, + "Fournisseurs d'immobilisations": { + "account_type": "Payable", + "Fournisseurs - Achats d'immobilisations": { + "account_type": "Payable", + "account_number": "4041" + }, + "Fournisseurs d'immobilisations - Retenues de garantie": { + "account_type": "Payable", + "account_number": "4047" + }, + "account_number": "404" + }, + "Fournisseurs d'immobilisations - Effets \u00e0 payer": { + "account_type": "Payable", + "account_number": "405" + }, + "Fournisseurs - Factures non parvenues": { + "account_type": "Stock Received But Not Billed", + "Fournisseurs": { + "account_type": "Stock Received But Not Billed", + "account_number": "4081" + }, + "Fournisseurs d'immobilisations": { + "account_type": "Stock Received But Not Billed", + "account_number": "4084" + }, + "Fournisseurs - Int\u00e9r\u00eats courus": { + "account_type": "Stock Received But Not Billed", + "account_number": "4088" + }, + "account_number": "408" + } + }, + "41-Clients et comptes rattach\u00e9s (PASSIF)": { + "Clients cr\u00e9diteurs": { + "Clients - Avances et acomptes re\u00e7us sur commandes": { + "account_number": "4191" + }, + "Clients - Dettes pour emballages et mat\u00e9riels consign\u00e9s": { + "account_number": "4196" + }, + "Clients - Autres avoirs": { + "account_number": "4197" + }, + "Rabais, remises, ristournes \u00e0 accorder et autres avoirs \u00e0 \u00e9tablir": { + "account_number": "4198" + }, + "account_number": "419" + } + }, + "42-Personnel et comptes rattach\u00e9s (PASSIF)": { + "Personnel - R\u00e9mun\u00e9rations dues": { + "account_number": "421" + }, + "Comit\u00e9s d'entreprises, d'\u00e9tablissement...": { + "account_number": "422" + }, + "Participation des salari\u00e9s aux r\u00e9sultats": { + "R\u00e9serve sp\u00e9ciale": { + "account_number": "4246" + }, + "Comptes courants": { + "account_number": "4248" + }, + "account_number": "424" + }, + "Personnel - D\u00e9p\u00f4ts": { + "account_number": "426" + }, + "Personnel - Oppositions": { + "account_number": "427" + }, + "Personnel - Charges \u00e0 payer et produits \u00e0 recevoir": { + "Dettes provisionn\u00e9es pour cong\u00e9s \u00e0 payer": { + "account_number": "4282" + }, + "Dettes provisionn\u00e9es pour participation des salari\u00e9s aux r\u00e9sultats": { + "account_number": "4284" + }, + "Autres charges \u00e0 payer": { + "account_number": "4286" + }, + "Produits \u00e0 recevoir": { + "account_number": "4287" + }, + "account_number": "428" + } + }, + "43-S\u00e9curit\u00e9 sociale et autres organismes sociaux (PASSIF)": { + "438-Organismes sociaux - Charges \u00e0 payer": { + "Charges sociales sur cong\u00e9s \u00e0 payer": { + "account_number": "4382" + }, + "Autres charges \u00e0 payer": { + "account_number": "4386" + } + } + }, + "44-Etat et autres collectivit\u00e9s publiques (PASSIF)": { + "Etat - Imp\u00f4ts et taxes recouvrables sur des tiers": { + "Obligataires": { + "account_number": "4424" + }, + "Associ\u00e9s": { + "account_number": "4425" + }, + "account_number": "442" + }, + "Etat - Imp\u00f4ts sur les b\u00e9n\u00e9fices": { + "account_number": "444" + }, + "Etat - Taxes sur le chiffre d'affaires (PASSIF)": { + "Taxes sur le chiffre d'affaires \u00e0 d\u00e9caisser": { + "TVA \u00e0 d\u00e9caisser": { + "account_number": "44551" + }, + "Taxes assimil\u00e9es \u00e0 la TVA": { + "account_number": "44558" + }, + "account_number": "4455" + }, + "Taxes sur le chiffre d'affaires collect\u00e9es par l'entreprise": { + "TVA collect\u00e9e": { + "account_type": "Tax", + "is_group": 1, + "account_number": "44571" + }, + "Taxes assimil\u00e9es \u00e0 la TVA": { + "account_number": "44578" + }, + "account_number": "4457" + }, + "4458-Taxes sur le chiffre d'affaires \u00e0 r\u00e9gulariser ou en attente (PASSIF)": { + "TVA r\u00e9cup\u00e9r\u00e9e d'avance": { + "account_number": "44584" + }, + "Taxes sur le chiffre d'affaires sur factures \u00e0 \u00e9tablir": { + "account_number": "44587" + } + } + }, + "Obligations cautionn\u00e9es": { + "account_number": "446" + }, + "Autres imp\u00f4ts, taxes et versements assimil\u00e9s": { + "account_number": "447" + }, + "Quotas d'\u00e9mission \u00e0 acqu\u00e9rir": { + "account_number": "449" + } + }, + "45-Groupe et associ\u00e9s (PASSIF)": { + "Groupe (PASSIF)": { + "account_number": "451" + }, + "Associ\u00e9s - Comptes courants (PASSIF)": { + "Principal (PASSIF)": { + "account_number": "4551" + }, + "Int\u00e9r\u00eats courus (PASSIF)": { + "account_number": "4558" + }, + "account_number": "455" + }, + "Associ\u00e9s - Op\u00e9rations sur le capital (PASSIF)": { + "456-Associ\u00e9s - Comptes d'apport en soci\u00e9t\u00e9": { + "Apports en nature": { + "account_number": "45611" + }, + "Apports en num\u00e9raire": { + "account_number": "45615" + }, + "account_number": "4561" + }, + "Associ\u00e9s - Versements re\u00e7us sur augmentation de capital": { + "account_number": "4563" + }, + "Associ\u00e9s - Versements anticip\u00e9s": { + "account_number": "4564" + }, + "Actionnaires d\u00e9faillants": { + "account_number": "4566" + }, + "Associ\u00e9s - Capital \u00e0 rembourser": { + "account_number": "4567" + } + }, + "Associ\u00e9s - Dividendes \u00e0 payer": { + "account_number": "457" + }, + "Associ\u00e9s - Op\u00e9rations faites en commun et en GIE": { + "Op\u00e9rations courantes": { + "account_number": "4581" + }, + "Int\u00e9r\u00eats courus": { + "account_number": "4588" + }, + "account_number": "458" + } + }, + "46-D\u00e9biteurs divers et cr\u00e9diteurs divers (PASSIF)": { + "Dettes sur acquisitions de valeurs mobili\u00e8res de placement": { + "account_number": "464" + }, + "467-Autres comptes d\u00e9biteurs ou cr\u00e9diteurs (PASSIF)": {}, + "468-Divers - Charges \u00e0 payer et produits \u00e0 recevoir (PASSIF)": { + "Charges \u00e0 payer": { + "account_number": "4686" + } + } + }, + "47-Comptes transitoires ou d'attente (PASSIF)": { + "471-Comptes d'attente (PASSIF)": { + "account_type": "Temporary" + }, + "Diff\u00e9rences de conversion (PASSIF)": { + "Augmentation des cr\u00e9ances": { + "account_number": "4771" + }, + "Diminution des dettes": { + "account_number": "4772" + }, + "Diff\u00e9rences compens\u00e9es par couverture de change": { + "account_number": "4778" + }, + "account_number": "477" + }, + "478-Autres comptes transitoires (PASSIF)": { + "Diff\u00e9rences d'\u00e9valuation sur instruments de tr\u00e9sorerie (PASSIF)": { + "account_number": "4787" + } + } + }, + "48-Comptes de r\u00e9gularisation (PASSIF)": { + "Produits constat\u00e9s d'avance": { + "account_number": "487" + }, + "448-Comptes de r\u00e9partition p\u00e9riodique des charges et des produits (PASSIF)": { + "Produits": { + "account_number": "4887" + } + } + } + }, + "Comptes Financiers": { + "root_type": "Asset", + "Valeurs mobili\u00e8res de placement": { + "Parts dans des entreprises li\u00e9es": { + "account_number": "501" + }, + "Actions propres": { + "Actions destin\u00e9es \u00e0 \u00eatre attribu\u00e9es aux employ\u00e9s et affect\u00e9es \u00e0 des plans d\u00e9termin\u00e9s": { + "account_number": "5021" + }, + "Actions disponibles pour \u00eatre attribu\u00e9es aux employ\u00e9s ou pour la r\u00e9gularisation des cours de bourse": { + "account_number": "5022" + }, + "account_number": "502" + }, + "Actions": { + "Titres cot\u00e9s": { + "account_number": "5031" + }, + "Titres non cot\u00e9s": { + "account_number": "5035" + }, + "account_number": "503" + }, + "Autres titres conf\u00e9rant un droit de propri\u00e9t\u00e9": { + "account_number": "504" + }, + "Obligations et bons \u00e9mis par la soci\u00e9t\u00e9 et rachet\u00e9s par elle": { + "account_number": "505" + }, + "Obligations": { + "Titres cot\u00e9s": { + "account_number": "5061" + }, + "Titres non cot\u00e9s": { + "account_number": "5065" + }, + "account_number": "506" + }, + "Bons du Tr\u00e9sor et bons de caisse \u00e0 court terme": { + "account_number": "507" + }, + "Autres valeurs mobili\u00e8res de placement et autres cr\u00e9ances assimil\u00e9es": { + "Autres valeurs mobili\u00e8res": { + "account_number": "5081" + }, + "Bons de souscription": { + "account_number": "5082" + }, + "Int\u00e9r\u00eats courus sur obligations, bons et valeurs assimil\u00e9es": { + "account_number": "5088" + }, + "account_number": "508" + }, + "Versements restant \u00e0 effectuer sur valeurs mobili\u00e8res de placement non lib\u00e9r\u00e9es": { + "account_number": "509" + }, + "account_number": "50" + }, + "Banques, \u00e9tablissements financiers et assimil\u00e9s": { + "Valeurs \u00e0 l'encaissement": { + "Coupons \u00e9chus \u00e0 l'encaissement": { + "account_number": "5111" + }, + "Ch\u00e8ques \u00e0 encaisser": { + "account_number": "5112" + }, + "Effets \u00e0 l'encaissement": { + "account_number": "5113" + }, + "Effets \u00e0 l'escompte": { + "account_number": "5114" + }, + "account_number": "511" + }, + "Banques": { + "account_type": "Bank", + "Comptes en monnaie nationale": { + "account_type": "Bank", + "account_number": "5121" + }, + "Comptes en devises": { + "account_type": "Bank", + "account_number": "5124" + }, + "account_number": "512" + }, + "Ch\u00e8ques postaux": { + "account_number": "514" + }, + "\"Caisses\" du Tr\u00e9sor et des \u00e9tablissements publics": { + "account_number": "515" + }, + "Soci\u00e9t\u00e9s de bourse": { + "account_number": "516" + }, + "Autres organismes financiers": { + "account_number": "517" + }, + "Int\u00e9r\u00eats courus": { + "Int\u00e9r\u00eats courus \u00e0 payer": { + "account_number": "5181" + }, + "Int\u00e9r\u00eats courus \u00e0 recevoir": { + "account_number": "5188" + }, + "account_number": "518" + }, + "Concours bancaires courants": { + "Cr\u00e9dit de mobilisation des cr\u00e9ances commerciales (CMCC)": { + "account_number": "5191" + }, + "Mobilisation de cr\u00e9ances n\u00e9es \u00e0 l'\u00e9tranger": { + "account_number": "5193" + }, + "Int\u00e9r\u00eats courus sur concours bancaires courants": { + "account_number": "5198" + }, + "account_number": "519" + }, + "account_number": "51" + }, + "Instruments de tr\u00e9sorerie": { + "is_group": 1, + "account_number": "52" + }, + "Caisse": { + "account_type": "Cash", + "Caisse si\u00e8ge social": { + "account_type": "Cash", + "Caisse en monnaie nationale": { + "account_type": "Cash", + "account_number": "5311" + }, + "Caisse en devises": { + "account_type": "Cash", + "account_number": "5314" + }, + "account_number": "531" + }, + "Caisse succursale (ou usine) A": { + "account_type": "Cash", + "account_number": "532" + }, + "Caisse succursale (ou usine) B": { + "account_type": "Cash", + "account_number": "533" + }, + "account_number": "53" + }, + "R\u00e9gies d'avance et accr\u00e9ditifs": { + "is_group": 1, + "account_number": "54" + }, + "Virements internes": { + "is_group": 1, + "account_number": "58" + }, + "D\u00e9pr\u00e9ciations des comptes financiers": { + "D\u00e9pr\u00e9ciations des valeurs mobili\u00e8res de placement": { + "Actions": { + "account_number": "5903" + }, + "Autres titres conf\u00e9rant un droit de propri\u00e9t\u00e9": { + "account_number": "5904" + }, + "Obligations": { + "account_number": "5906" + }, + "Autres valeurs mobili\u00e8res de placement et cr\u00e9ances assimil\u00e9es": { + "account_number": "5908" + }, + "account_number": "590" + }, + "account_number": "59" + }, + "account_number": "5" + }, + "Comptes de Charges": { + "root_type": "Expense", + "Achats (sauf 603)": { + "Achats stock\u00e9s - Mati\u00e8res premi\u00e8res (et fournitures)": { + "account_type": "Cost of Goods Sold", + "Mati\u00e8res (ou groupe) A": { + "account_type": "Cost of Goods Sold", + "account_number": "6011" + }, + "Mati\u00e8res (ou groupe) B": { + "account_type": "Cost of Goods Sold", + "account_number": "6012" + }, + "Fournitures A, B, C...": { + "account_type": "Cost of Goods Sold", + "account_number": "6017" + }, + "account_number": "601" + }, + "Achats stock\u00e9s - Autres approvisionnements": { + "account_type": "Cost of Goods Sold", + "Mati\u00e8res consommables": { + "account_type": "Cost of Goods Sold", + "Mati\u00e8res (ou groupe) C": { + "account_type": "Cost of Goods Sold", + "account_number": "60211" + }, + "Mati\u00e8res (ou groupe) D": { + "account_type": "Cost of Goods Sold", + "account_number": "60212" + }, + "account_number": "6021" + }, + "Fournitures consommables": { + "account_type": "Cost of Goods Sold", + "Combustibles": { + "account_type": "Cost of Goods Sold", + "account_number": "60221" + }, + "Produits d'entretien": { + "account_type": "Cost of Goods Sold", + "account_number": "60222" + }, + "Fournitures d'atelier et d'usine": { + "account_type": "Cost of Goods Sold", + "account_number": "60223" + }, + "Fournitures de magasin": { + "account_type": "Cost of Goods Sold", + "account_number": "60224" + }, + "Fournitures de bureau": { + "account_type": "Cost of Goods Sold", + "account_number": "60225" + }, + "account_number": "6022" + }, + "Emballages": { + "account_type": "Cost of Goods Sold", + "Emballages perdus": { + "account_type": "Cost of Goods Sold", + "account_number": "60261" + }, + "Emballages r\u00e9cup\u00e9rables non identifiables": { + "account_type": "Cost of Goods Sold", + "account_number": "60265" + }, + "Emballages \u00e0 usage mixte": { + "account_type": "Cost of Goods Sold", + "account_number": "60267" + }, + "account_number": "6026" + }, + "account_number": "602" + }, + "Variations des stocks (approvisionnements et marchandises)": { + "account_type": "Stock Adjustment", + "Variation des stocks de mati\u00e8res premi\u00e8res (et fournitures)": { + "account_type": "Stock Adjustment", + "account_number": "6031" + }, + "Variation des stocks des autres approvisionnements": { + "account_type": "Stock Adjustment", + "account_number": "6032" + }, + "Variation des stocks de marchandises": { + "account_type": "Stock Adjustment", + "account_number": "6037" + }, + "account_number": "603" + }, + "Achats d'\u00e9tudes et prestations de service": { + "account_type": "Cost of Goods Sold", + "account_number": "604" + }, + "Achats de mat\u00e9riel, \u00e9quipements et travaux": { + "account_type": "Cost of Goods Sold", + "account_number": "605" + }, + "Achats non stock\u00e9s de mati\u00e8res et founitures": { + "account_type": "Cost of Goods Sold", + "Fournitures non stockables (eau, \u00e9nergie...)": { + "account_type": "Cost of Goods Sold", + "account_number": "6061" + }, + "Fournitures d'entretien et de petit \u00e9quipement": { + "account_type": "Cost of Goods Sold", + "account_number": "6063" + }, + "Fournitures administratives": { + "account_type": "Cost of Goods Sold", + "account_number": "6064" + }, + "Autres mati\u00e8res et fournitures": { + "account_type": "Cost of Goods Sold", + "account_number": "6068" + }, + "account_number": "606" + }, + "Achats de marchandises": { + "account_type": "Cost of Goods Sold", + "Marchandises (ou groupe) A": { + "account_type": "Cost of Goods Sold", + "account_number": "6071" + }, + "Marchandises (ou groupe) B": { + "account_type": "Cost of Goods Sold", + "account_number": "6072" + }, + "account_number": "607" + }, + "(Compte r\u00e9serv\u00e9, le cas \u00e9ch\u00e9ant, \u00e0 la recapitulation des Frais accessoires incorpor\u00e9s aux achats)": { + "account_type": "Expenses Included In Valuation", + "account_number": "608" + }, + "Rabais, remises et ristournes obtenus sur achats": { + "Rabais, remises et ristournes obtenus sur achats - de mati\u00e8res premi\u00e8res (et fournitures)": { + "account_number": "6091" + }, + "Rabais, remises et ristournes obtenus sur achats - d'autres approvisionnements stock\u00e9s": { + "account_number": "6092" + }, + "Rabais, remises et ristournes obtenus sur achats - d'\u00e9tudes et prestations de services": { + "account_number": "6094" + }, + "Rabais, remises et ristournes obtenus sur achats - de mat\u00e9riel, \u00e9quipements et travaux": { + "account_number": "6095" + }, + "Rabais, remises et ristournes obtenus sur achats - d'approvisionnements non stock\u00e9s": { + "account_number": "6096" + }, + "Rabais, remises et ristournes obtenus sur achats - de marchandises": { + "account_number": "6097" + }, + "Rabais, remises et ristournes non affect\u00e9s": { + "account_number": "6098" + }, + "account_number": "609" + }, + "account_number": "60" + }, + "Services ext\u00e9rieurs": { + "Sous-traitance g\u00e9n\u00e9rale": { + "account_number": "611" + }, + "Redevances de cr\u00e9dit-bail": { + "Cr\u00e9dit-bail mobilier": { + "account_number": "6122" + }, + "Cr\u00e9dit-bail immobilier": { + "account_number": "6125" + }, + "account_number": "612" + }, + "Locations": { + "Locations immobili\u00e8res": { + "account_number": "6132" + }, + "Locations mobili\u00e8res": { + "account_number": "6135" + }, + "Malis sur emballages": { + "account_number": "6136" + }, + "account_number": "613" + }, + "Charges locatives et de copropri\u00e9t\u00e9": { + "account_number": "614" + }, + "Entretiens et r\u00e9parations": { + "Entretiens et r\u00e9parations - sur biens immobiliers": { + "account_number": "6152" + }, + "Entretiens et r\u00e9parations - sur biens mobiliers": { + "account_number": "6155" + }, + "Maintenance": { + "account_number": "6156" + }, + "account_number": "615" + }, + "Primes d'assurance": { + "Multirisques": { + "account_number": "6161" + }, + "Assurance obligatoire dommage construction": { + "account_number": "6162" + }, + "Assurance-transport": { + "Assurance-transport - sur achats": { + "account_number": "61636" + }, + "Assurance-transport - sur ventes": { + "account_number": "61637" + }, + "Assurance-transport - sur autres biens": { + "account_number": "61638" + }, + "account_number": "6163" + }, + "Risques d'exploitation": { + "account_number": "6164" + }, + "Insolvabilit\u00e9 clients": { + "account_number": "6165" + }, + "account_number": "616" + }, + "Etudes et recherches": { + "account_number": "617" + }, + "Divers": { + "Documentation g\u00e9n\u00e9rale": { + "account_number": "6181" + }, + "Documentation technique": { + "account_number": "6183" + }, + "Frais de colloques, s\u00e9minaires, conf\u00e9rences": { + "account_number": "6185" + }, + "account_number": "618" + }, + "Rabais, remises et ristournes obtenus sur services ext\u00e9rieurs": { + "account_number": "619" + }, + "account_number": "61" + }, + "Autres services ext\u00e9rieurs": { + "Personnel ext\u00e9rieur \u00e0 l'entreprise": { + "Personnel int\u00e9rimaire": { + "account_number": "6211" + }, + "Personnel d\u00e9tach\u00e9 ou pr\u00eat\u00e9 \u00e0 l'entreprise": { + "account_number": "6214" + }, + "account_number": "621" + }, + "R\u00e9mun\u00e9rations d'interm\u00e9diaires et honoraires": { + "Commissions et courtages sur achats": { + "account_number": "6221" + }, + "Commissions et courtages sur ventes": { + "account_number": "6222" + }, + "R\u00e9mun\u00e9rations des transitaires": { + "account_number": "6224" + }, + "R\u00e9mun\u00e9rations d'affacturage": { + "account_number": "6225" + }, + "Honoraires": { + "account_number": "6226" + }, + "Frais d'actes et de contentieux": { + "account_number": "6227" + }, + "Divers": { + "account_number": "6228" + }, + "account_number": "622" + }, + "Publicit\u00e9, publications, relations publiques": { + "Annonces et insertions": { + "account_number": "6231" + }, + "Echantillons": { + "account_number": "6232" + }, + "Foires et expositions": { + "account_number": "6233" + }, + "Cadeaux \u00e0 la client\u00e8le": { + "account_number": "6234" + }, + "Primes": { + "account_number": "6235" + }, + "Catalogues et imprim\u00e9s": { + "account_number": "6236" + }, + "Publications": { + "account_number": "6237" + }, + "Divers (pourboires, dons courants...)": { + "account_number": "6238" + }, + "account_number": "623" + }, + "Transports de biens et transports collectifs du personnel": { + "Transports sur achats": { + "account_number": "6241" + }, + "Transports sur ventes": { + "account_type": "Chargeable", + "account_number": "6242" + }, + "Transports entre \u00e9tablissements ou chantiers": { + "account_number": "6243" + }, + "Transports administratifs": { + "account_number": "6244" + }, + "Transports collectifs du personnel": { + "account_number": "6247" + }, + "Divers": { + "account_number": "6248" + }, + "account_number": "624" + }, + "D\u00e9placements, missions et r\u00e9ceptions": { + "Voyages et d\u00e9placements": { + "account_number": "6251" + }, + "Frais de d\u00e9m\u00e9nagement": { + "account_number": "6255" + }, + "Missions": { + "account_number": "6256" + }, + "R\u00e9ceptions": { + "account_number": "6257" + }, + "account_number": "625" + }, + "Frais postaux et de t\u00e9l\u00e9communications": { + "account_number": "626" + }, + "Services bancaires et assimil\u00e9s": { + "Frais sur titres (achat, vente, garde)": { + "account_number": "6271" + }, + "Commissions et frais sur \u00e9mission d'emprunts": { + "account_number": "6272" + }, + "Frais sur effets": { + "account_number": "6275" + }, + "Location de coffres": { + "account_number": "6276" + }, + "Autres frais et commissions sur prestations de services": { + "account_number": "6278" + }, + "account_number": "627" + }, + "Divers": { + "Concours divers (cotisations...)": { + "account_number": "6281" + }, + "Frais de recrutement de personnel": { + "account_number": "6284" + }, + "account_number": "628" + }, + "Rabais, remises et ristournes obtenus sur autres services ext\u00e9rieurs": { + "account_number": "629" + }, + "account_number": "62" + }, + "Imp\u00f4ts, taxes et versements assimil\u00e9s": { + "Imp\u00f4ts, taxes et versements assimil\u00e9s sur r\u00e9mun\u00e9rations (administrations des imp\u00f4ts)": { + "Taxes sur les salaires": { + "account_number": "6311" + }, + "Taxe d'apprentissage": { + "account_number": "6312" + }, + "Participation des employeurs \u00e0 la formation professionnelle continue": { + "account_number": "6313" + }, + "Cotisation pour d\u00e9faut d'investissement obligatoire dans la construction": { + "account_number": "6314" + }, + "Autres": { + "account_number": "6318" + }, + "account_number": "631" + }, + "Imp\u00f4ts, taxes et versements assimil\u00e9s sur r\u00e9mun\u00e9rations (autres organismes)": { + "Versement de transport": { + "account_number": "6331" + }, + "Allocations logement": { + "account_number": "6332" + }, + "Participation des employeurs \u00e0 la formation professionnelle continue": { + "account_number": "6333" + }, + "Participation des employeurs \u00e0 l'effort de construction": { + "account_number": "6334" + }, + "Versements lib\u00e9ratoires ouvrant droit \u00e0 l'\u00e9xon\u00e9ration de la taxe d'apprentissage": { + "account_number": "6335" + }, + "Autres": { + "account_number": "6338" + }, + "account_number": "633" + }, + "Autres imp\u00f4ts, taxes et versements assimil\u00e9s (administrations des imp\u00f4ts)": { + "Imp\u00f4ts directs (sauf imp\u00f4ts sur les b\u00e9n\u00e9fices)": { + "Contribution \u00e9conomique territoriale": { + "account_number": "63511" + }, + "Taxes fonci\u00e8res": { + "account_number": "63512" + }, + "Autres imp\u00f4ts locaux": { + "account_number": "63513" + }, + "Taxe sur les v\u00e9hicules des soci\u00e9t\u00e9s": { + "account_number": "63514" + }, + "account_number": "6351" + }, + "Taxes sur le chiffre d'affaires non r\u00e9cup\u00e9rables": { + "account_number": "6352" + }, + "Imp\u00f4ts indirects": { + "account_number": "6353" + }, + "Droits d'enregistrement et de timbre": { + "Droits de mutation": { + "account_number": "63541" + }, + "account_number": "6354" + }, + "Autres droits": { + "account_number": "6358" + }, + "account_number": "635" + }, + "Autres imp\u00f4ts, taxes et versements assimil\u00e9s (autres organismes)": { + "Contribution sociale de solidarit\u00e9 \u00e0 la charge des soci\u00e9t\u00e9s": { + "account_number": "6371" + }, + "Taxes per\u00e7ues par les organismes publics internationaux": { + "account_number": "6372" + }, + "Imp\u00f4ts et taxes exigibles \u00e0 l'\u00e9tranger": { + "account_number": "6374" + }, + "Taxes diverses": { + "account_number": "6378" + }, + "account_number": "637" + }, + "account_number": "63" + }, + "Charges de personnel": { + "R\u00e9mun\u00e9rations du personnel": { + "Salaires, appointements": { + "account_number": "6411" + }, + "Cong\u00e9s pay\u00e9s": { + "account_number": "6412" + }, + "Primes et gratifications": { + "account_number": "6413" + }, + "Indemnit\u00e9s et avantages divers": { + "account_number": "6414" + }, + "Suppl\u00e9ment familial": { + "account_number": "6415" + }, + "account_number": "641" + }, + "R\u00e9mun\u00e9ration du travail de l'exploitant": { + "account_number": "644" + }, + "Charges de s\u00e9curit\u00e9 sociale et de pr\u00e9voyance": { + "Cotisations \u00e0 l'URSSAF": { + "account_number": "6451" + }, + "Cotisations aux mutuelles": { + "account_number": "6452" + }, + "Cotisations aux caisses de retraites": { + "account_number": "6453" + }, + "Cotisations aux ASSEDIC": { + "account_number": "6454" + }, + "account_number": "645" + }, + "Cotisations sociales personnelles de l'exploitant": { + "account_number": "646" + }, + "Autres charges sociales": { + "is_group": 1, + "account_number": "647" + }, + "Autres charges de personnel": { + "account_number": "648" + }, + "account_number": "64" + }, + "Autres charges de gestion courante": { + "Redevances pour concessions, brevets, licences, marques, proc\u00e9d\u00e9s, logiciels, droits et valeurs similaires": { + "Redevances pour concessions, brevets, licences, marques, proc\u00e9d\u00e9s, logiciels": { + "account_number": "6511" + }, + "Droits d'auteur et de reproduction": { + "account_number": "6516" + }, + "Autres droits et valeurs similaires": { + "account_number": "6518" + }, + "account_number": "651" + }, + "Jetons de pr\u00e9sence": { + "account_number": "653" + }, + "Pertes sur cr\u00e9ances irr\u00e9couvrables": { + "Cr\u00e9ances de l'exercice": { + "account_number": "6541" + }, + "Cr\u00e9ances des exercices ant\u00e9rieurs": { + "account_number": "6544" + }, + "account_number": "654" + }, + "Quotes-parts de r\u00e9sultat sur op\u00e9rations faites en commun": { + "Quote-part de b\u00e9n\u00e9fice transf\u00e9r\u00e9e (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "6551" + }, + "Quote-part de perte support\u00e9e (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "6555" + }, + "account_number": "655" + }, + "Pertes de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "656" + }, + "Charges diverses de gestion courante": { + "account_number": "658" + }, + "account_number": "65" + }, + "Charges financi\u00e8res": { + "Charges d'int\u00e9r\u00eats": { + "Int\u00e9r\u00eats des emprunts et dettes": { + "Int\u00e9r\u00eats des emprunts et dettes - des emprunts et dettes assimil\u00e9es": { + "account_number": "66116" + }, + "Int\u00e9r\u00eats des emprunts et dettes - des dettes rattach\u00e9es \u00e0 des participations": { + "account_number": "66117" + }, + "account_number": "6611" + }, + "Charges de la fiducie, r\u00e9sultat de la p\u00e9riode": { + "account_number": "6612" + }, + "Int\u00e9r\u00eats des comptes courants et des d\u00e9p\u00f4ts cr\u00e9diteurs": { + "account_number": "6615" + }, + "Int\u00e9r\u00eats bancaires et sur op\u00e9rations de financement (escompte...)": { + "account_number": "6616" + }, + "Int\u00e9r\u00eats des obligations cautionn\u00e9es": { + "account_number": "6617" + }, + "Int\u00e9r\u00eats des autres dettes": { + "Int\u00e9r\u00eats des autres dettes - des dettes commerciales": { + "account_number": "66181" + }, + "Int\u00e9r\u00eats des autres dettes - des dettes diverses": { + "account_number": "66188" + }, + "account_number": "6618" + }, + "account_number": "661" + }, + "Pertes sur cr\u00e9ances li\u00e9es \u00e0 des participations": { + "account_number": "664" + }, + "Escomptes accord\u00e9s": { + "account_number": "665" + }, + "Pertes de change financi\u00e8res": { + "account_type": "Round Off", + "account_number": "666" + }, + "Charges nettes sur cessions de valeurs mobili\u00e8res de placement": { + "account_number": "667" + }, + "Autres charges financi\u00e8res": { + "account_number": "668" + }, + "account_number": "66" + }, + "Charges exceptionnelles": { + "Charges exceptionnelles sur op\u00e9rations de gestion": { + "P\u00e9nalit\u00e9s sur march\u00e9s (et d\u00e9dits pay\u00e9s sur achats et ventes)": { + "account_number": "6711" + }, + "P\u00e9nalit\u00e9s, amendes fiscales et p\u00e9nales": { + "account_number": "6712" + }, + "Dons, lib\u00e9ralit\u00e9s": { + "account_number": "6713" + }, + "Cr\u00e9ances devenues irr\u00e9couvrables dans l'exercice": { + "account_number": "6714" + }, + "Subventions accord\u00e9es": { + "account_number": "6715" + }, + "Rappel d'imp\u00f4ts (autres qu'imp\u00f4ts sur les b\u00e9n\u00e9fices)": { + "account_number": "6717" + }, + "Autres charges exceptionnelles sur op\u00e9rations de gestion": { + "account_number": "6718" + }, + "account_number": "671" + }, + "(Compte \u00e0 la disposition des entit\u00e9s pour enregistrer, en cours d'exercice, les charges sur exercices ant\u00e9rieurs)": { + "account_number": "672" + }, + "Op\u00e9rations de constitution ou liquidation des fiducies": { + "Op\u00e9rations li\u00e9es \u00e0 la constitution de la fiducie - transfert des \u00e9l\u00e9ments": { + "account_number": "6741" + }, + "Op\u00e9rations li\u00e9es \u00e0 la liquidation de la fiducie": { + "account_number": "6742" + }, + "account_number": "674" + }, + "Valeurs comptables des \u00e9l\u00e9ments d'actif c\u00e9d\u00e9s": { + "Immobilisations incorporelles": { + "account_number": "6751" + }, + "Immobilisations corporelles": { + "account_number": "6752" + }, + "Immobilisations financi\u00e8res": { + "account_number": "6756" + }, + "Autres \u00e9l\u00e9ments d'actif": { + "account_number": "6758" + }, + "account_number": "675" + }, + "Autres charges exceptionnelles": { + "Mali provenant de clauses d'indexation": { + "account_number": "6781" + }, + "Lots": { + "account_number": "6782" + }, + "Malis provenant du rachat par l'entreprise d'actions et obligations \u00e9mises par elles-m\u00eame": { + "account_number": "6783" + }, + "Charges exceptionnelles diverses": { + "account_number": "6788" + }, + "account_number": "678" + }, + "account_number": "67" + }, + "Dotations aux amortissements, d\u00e9pr\u00e9ciations et provisions": { + "account_type": "Depreciation", + "Dotations aux amortissements, d\u00e9pr\u00e9ciations et provisions - Charges d'exploitation": { + "account_type": "Depreciation", + "Dotations aux amortissements sur immobilisations incorporelles et corporelles": { + "account_type": "Depreciation", + "Immobilisations incorporelles": { + "account_type": "Depreciation", + "account_number": "68111" + }, + "Immobilisations corporelles": { + "account_type": "Depreciation", + "account_number": "68112" + }, + "account_number": "6811" + }, + "Dotations aux amortissements des charges d'exploitation \u00e0 r\u00e9partir": { + "account_type": "Depreciation", + "account_number": "6812" + }, + "Dotations aux provisions d'exploitation": { + "account_type": "Depreciation", + "account_number": "6815" + }, + "Dotations aux d\u00e9pr\u00e9ciations des immobilisations incorporelles et corporelles": { + "account_type": "Depreciation", + "Immobilisations incorporelles": { + "account_type": "Depreciation", + "account_number": "68161" + }, + "Immobilisations corporelles": { + "account_type": "Depreciation", + "account_number": "68162" + }, + "account_number": "6816" + }, + "Dotations pour d\u00e9pr\u00e9ciations des actifs circulants": { + "account_type": "Depreciation", + "Stocks et en-cours": { + "account_type": "Depreciation", + "account_number": "68173" + }, + "Cr\u00e9ances": { + "account_type": "Depreciation", + "account_number": "68174" + }, + "account_number": "6817" + }, + "account_number": "681" + }, + "Dotations aux amortissements, d\u00e9pr\u00e9ciations et provisions - Charges financi\u00e8res": { + "account_type": "Depreciation", + "Dotations aux amortissements des primes de remboursement des obligations": { + "account_type": "Depreciation", + "account_number": "6861" + }, + "Dotations aux provisions financi\u00e8res": { + "account_type": "Depreciation", + "account_number": "6865" + }, + "Dotations aux d\u00e9pr\u00e9ciations des \u00e9l\u00e9ments financiers": { + "account_type": "Depreciation", + "Immobilisations financi\u00e8res": { + "account_type": "Depreciation", + "account_number": "68662" + }, + "Valeurs mobili\u00e8res de placement": { + "account_type": "Depreciation", + "account_number": "68665" + }, + "account_number": "6866" + }, + "Autres dotations": { + "account_type": "Depreciation", + "account_number": "6868" + }, + "account_number": "686" + }, + "Dotations aux amortissements, d\u00e9pr\u00e9ciations et provisions - Charges exceptionnelles": { + "account_type": "Depreciation", + "Dotations aux amortissements exceptionnels des immobilisations": { + "account_type": "Depreciation", + "account_number": "6871" + }, + "Dotations aux provisions r\u00e9glement\u00e9es (immobilisations)": { + "account_type": "Depreciation", + "Amortissements d\u00e9rogatoires": { + "account_type": "Depreciation", + "account_number": "68725" + }, + "account_number": "6872" + }, + "Dotations aux provisions r\u00e9glement\u00e9es (stocks)": { + "account_type": "Depreciation", + "account_number": "6873" + }, + "Dotations aux autres provisions r\u00e9glement\u00e9es": { + "account_type": "Depreciation", + "account_number": "6874" + }, + "Dotations aux provisions exceptionnelles": { + "account_type": "Depreciation", + "account_number": "6875" + }, + "Dotations aux d\u00e9pr\u00e9ciations exceptionnelles": { + "account_type": "Depreciation", + "account_number": "6876" + }, + "account_number": "687" + }, + "account_number": "68" + }, + "Participation des salari\u00e9s, imp\u00f4ts sur les b\u00e9n\u00e9fices et assimil\u00e9s": { + "Participation des salari\u00e9s aux r\u00e9sultats": { + "account_number": "691" + }, + "Imp\u00f4ts sur les b\u00e9n\u00e9fices": { + "Imp\u00f4ts dus en France": { + "account_number": "6951" + }, + "Contribution additionnelle \u00e0 l'imp\u00f4t sur les b\u00e9n\u00e9fices": { + "account_number": "6952" + }, + "Imp\u00f4ts dus \u00e0 l'\u00e9tranger": { + "account_number": "6954" + }, + "account_number": "695" + }, + "Suppl\u00e9ments d'imp\u00f4ts sur les soci\u00e9t\u00e9s, li\u00e9s aux distributions": { + "account_number": "696" + }, + "Int\u00e9gration fiscale": { + "Int\u00e9gration fiscale - Charges": { + "account_number": "6981" + }, + "Int\u00e9gration fiscale - Produits": { + "account_number": "6989" + }, + "account_number": "698" + }, + "Produits - Report en arri\u00e8re des d\u00e9ficits": { + "account_number": "699" + }, + "account_number": "69" + }, + "account_number": "6" + }, + "Comptes de Produits": { + "root_type": "Income", + "Ventes de produits fabriqu\u00e9s, prestations de services, marchandises": { + "Ventes de produits finis": { + "Produits finis (ou groupe) A": { + "account_number": "7011" + }, + "Produits (ou groupe) B": { + "account_number": "7012" + }, + "account_number": "701" + }, + "Ventes de produits interm\u00e9diaires": { + "account_number": "702" + }, + "Ventes de produits r\u00e9siduels": { + "account_number": "703" + }, + "Travaux": { + "Travaux de cat\u00e9gorie (ou activit\u00e9) A": { + "account_number": "7041" + }, + "Travaux de cat\u00e9gorie (ou activit\u00e9) B": { + "account_number": "7042" + }, + "account_number": "704" + }, + "Etudes": { + "account_number": "705" + }, + "Prestations de services": { + "account_number": "706" + }, + "Ventes de marchandises": { + "Marchandises (ou groupe) A": { + "account_number": "7071" + }, + "Marchandises (ou groupe) B": { + "account_number": "7072" + }, + "account_number": "707" + }, + "Produits des activit\u00e9s annexes": { + "Produits des services exploit\u00e9s dans l'int\u00e9r\u00eat du personnel": { + "account_number": "7081" + }, + "Commissions et courtages": { + "account_number": "7082" + }, + "Locations diverses": { + "account_number": "7083" + }, + "Mise \u00e0 disposition de personnel factur\u00e9e": { + "account_number": "7084" + }, + "Ports et frais accessoires factur\u00e9s": { + "account_number": "7085" + }, + "Bonis sur reprises d'emballages consign\u00e9s": { + "account_number": "7086" + }, + "Bonifications obtenues des clients et primes sur ventes": { + "account_number": "7087" + }, + "Autres produits d'activit\u00e9s annexes (cessions d'approvisionnements...)": { + "account_number": "7088" + }, + "account_number": "708" + }, + "Rabais, remises et ristournes accord\u00e9s par l'entreprise": { + "Rabais, remises et ristournes accord\u00e9s par l'entreprise - sur ventes de produits finis": { + "account_number": "7091" + }, + "Rabais, remises et ristournes accord\u00e9s par l'entreprise - sur ventes de produits interm\u00e9diaires": { + "account_number": "7092" + }, + "Rabais, remises et ristournes accord\u00e9s par l'entreprise - sur travaux": { + "account_number": "7094" + }, + "Rabais, remises et ristournes accord\u00e9s par l'entreprise - sur \u00e9tudes": { + "account_number": "7095" + }, + "Rabais, remises et ristournes accord\u00e9s par l'entreprise - sur prestations de services": { + "account_number": "7096" + }, + "Rabais, remises et ristournes accord\u00e9s par l'entreprise - sur ventes de marchandises": { + "account_number": "7097" + }, + "Rabais, remises et ristournes accord\u00e9s par l'entreprise - sur produits des activit\u00e9s annexes": { + "account_number": "7098" + }, + "account_number": "709" + }, + "account_number": "70" + }, + "Production stock\u00e9e (ou d\u00e9stockage)": { + "Variation des stocks (en-cours de production, produits)": { + "Variation des en-cours de production de biens": { + "Produits en cours": { + "account_number": "71331" + }, + "Travaux en cours": { + "account_number": "71335" + }, + "account_number": "7133" + }, + "Variation des en-cours de production de services": { + "Etudes en cours": { + "account_number": "71341" + }, + "Prestations de services en cours": { + "account_number": "71345" + }, + "account_number": "7134" + }, + "Variation des stocks de produits": { + "Produits interm\u00e9diaires": { + "account_number": "71351" + }, + "Produits finis": { + "account_number": "71355" + }, + "Produits r\u00e9siduels": { + "account_number": "71358" + }, + "account_number": "7135" + }, + "account_number": "713" + }, + "account_number": "71" + }, + "Production immobilis\u00e9e": { + "Immobilisations incorporelles": { + "account_number": "721" + }, + "Immobilisations corporelles": { + "account_number": "722" + }, + "account_number": "72" + }, + "Subventions d'exploitation": { + "is_group": 1, + "account_number": "74" + }, + "Autres produits de gestion courante": { + "Redevances pour concessions, brevets, licences, marques, proc\u00e9d\u00e9s, logiciels, droits et valeurs similaires": { + "Redevances pour concessions, brevets, licences, marques, proc\u00e9d\u00e9s, logiciels": { + "account_number": "7511" + }, + "Droits d'auteur et de reproduction": { + "account_number": "7516" + }, + "Autres droits et valeurs similaires": { + "account_number": "7518" + }, + "account_number": "751" + }, + "Revenus des immeubles non affect\u00e9s aux activit\u00e9s professionnelles": { + "account_number": "752" + }, + "Jetons de pr\u00e9sence et r\u00e9mun\u00e9rations d'administrateurs, g\u00e9rants...": { + "account_number": "753" + }, + "Ristournes per\u00e7ues des coop\u00e9ratives (provenant des exc\u00e9dents)": { + "account_number": "754" + }, + "Quotes-parts de r\u00e9sultats sur op\u00e9rations faites en commun": { + "Quote-part de perte transf\u00e9r\u00e9e (comptabilit\u00e9 du g\u00e9rant)": { + "account_number": "7551" + }, + "Quote-part de b\u00e9n\u00e9fice attribu\u00e9 (comptabilit\u00e9 des associ\u00e9s non g\u00e9rants)": { + "account_number": "7555" + }, + "account_number": "755" + }, + "Gains de change sur cr\u00e9ances et dettes commerciales": { + "account_number": "756" + }, + "Produits divers de gestion courante": { + "account_number": "758" + }, + "account_number": "75" + }, + "Produits financiers": { + "Produits de participations": { + "Revenus des titres de participation": { + "account_number": "7611" + }, + "Produits de la fiducie, r\u00e9sultat de la p\u00e9riode": { + "account_number": "7612" + }, + "Revenus sur autres formes de participation": { + "account_number": "7616" + }, + "Revenus des cr\u00e9ances rattach\u00e9es \u00e0 des participations": { + "account_number": "7617" + }, + "account_number": "761" + }, + "Produits des autres immobilisations financi\u00e8res": { + "Revenus des titres immobilis\u00e9s": { + "account_number": "7621" + }, + "Revenus des pr\u00eats": { + "account_number": "7626" + }, + "Revenus des cr\u00e9ances immobilis\u00e9es": { + "account_number": "7627" + }, + "account_number": "762" + }, + "Revenus des autres cr\u00e9ances": { + "Revenus des cr\u00e9ances commerciales": { + "account_number": "7631" + }, + "Revenus des cr\u00e9ances diverses": { + "account_number": "7638" + }, + "account_number": "763" + }, + "Revenus des valeurs mobili\u00e8res de placement": { + "account_number": "764" + }, + "Escomptes obtenus": { + "account_number": "765" + }, + "Gains de change financi\u00e8res": { + "account_type": "Round Off", + "account_number": "766" + }, + "Produits nets sur cessions de valeurs mobili\u00e8res de placement": { + "account_number": "767" + }, + "Autres produits financiers": { + "account_number": "768" + }, + "account_number": "76" + }, + "Produits exceptionnels": { + "Produits exceptionnels sur op\u00e9rations de gestion": { + "D\u00e9dits et p\u00e9nalit\u00e9s per\u00e7us sur achats et sur ventes": { + "account_number": "7711" + }, + "Lib\u00e9ralit\u00e9s re\u00e7ues": { + "account_number": "7713" + }, + "Rentr\u00e9es sur cr\u00e9ances amorties": { + "account_number": "7714" + }, + "Subventions d'\u00e9quilibre": { + "account_number": "7715" + }, + "D\u00e9gr\u00e8vements d'imp\u00f4ts autres qu'imp\u00f4ts sur les b\u00e9n\u00e9fices": { + "account_number": "7717" + }, + "Autres produits exceptionnels sur op\u00e9rations de gestion": { + "account_number": "7718" + }, + "account_number": "771" + }, + "(Compte \u00e0 la disposition des entit\u00e9s pour enregistrer, en cours d'exercice, les Produits sur exercices ant\u00e9rieurs)": { + "account_number": "772" + }, + "Op\u00e9rations de constitution ou liquidation des fiducies": { + "Op\u00e9rations li\u00e9es \u00e0 la constitution de la fiducie - transfert des \u00e9l\u00e9ments": { + "account_number": "7741" + }, + "Op\u00e9rations li\u00e9es \u00e0 la liquidation de la fiducie": { + "account_number": "7742" + }, + "account_number": "774" + }, + "Produits des cessions d'\u00e9l\u00e9ments d'actif": { + "Immobilisations incorporelles": { + "account_number": "7751" + }, + "Immobilisations corporelles": { + "account_number": "7752" + }, + "Immobilisations financi\u00e8res": { + "account_number": "7756" + }, + "Autres \u00e9l\u00e9ments d'actif": { + "account_number": "7758" + }, + "account_number": "775" + }, + "Quote-part des subventions d'investissement vir\u00e9e au r\u00e9sultat de l'exercice": { + "account_number": "777" + }, + "Autres produits exceptionnels": { + "Bonis provenant de clauses d'indexation": { + "account_number": "7781" + }, + "Lots": { + "account_number": "7782" + }, + "Bonis provenant du rachat par l'entreprise d'actions et d'obligations \u00e9mises par elle-m\u00eame": { + "account_number": "7783" + }, + "Produits exceptionnels divers": { + "account_number": "7788" + }, + "account_number": "778" + }, + "account_number": "77" + }, + "Reprises sur amortissements, d\u00e9pr\u00e9ciations et provisions": { + "Reprises sur amortissements, d\u00e9pr\u00e9ciations et provisions (\u00e0 inscrire dans les produits d'exploitation)": { + "Reprises sur amortissements des immobilisations incorporelles et corporelles": { + "Immobilisations incorporelles": { + "account_number": "78111" + }, + "Immobilisations corporelles": { + "account_number": "78112" + }, + "account_number": "7811" + }, + "Reprises sur provisions d'exploitation": { + "account_number": "7815" + }, + "Reprises sur d\u00e9pr\u00e9ciations des immobilisations corporelles et incorporelles": { + "Immobilisations incorporelles": { + "account_number": "78161" + }, + "Immobilisations corporelles": { + "account_number": "78162" + }, + "account_number": "7816" + }, + "Reprises sur d\u00e9pr\u00e9ciations des actifs circulants": { + "Stocks et en-cours": { + "account_number": "78173" + }, + "Cr\u00e9ances": { + "account_number": "78174" + }, + "account_number": "7817" + }, + "account_number": "781" + }, + "Reprises sur d\u00e9pr\u00e9ciations et provisions (\u00e0 inscrire dans les produits financiers)": { + "Reprises sur provisions financi\u00e8res": { + "account_number": "7865" + }, + "Reprises sur d\u00e9pr\u00e9ciations des \u00e9l\u00e9ments financiers": { + "Immobilisations financi\u00e8res": { + "account_number": "78662" + }, + "Valeurs mobili\u00e8res de placement": { + "account_number": "78665" + }, + "account_number": "7866" + }, + "account_number": "786" + }, + "Reprises sur d\u00e9pr\u00e9ciations et provisions (\u00e0 inscrire dans les produits exceptionnels)": { + "Reprises sur provisions r\u00e9glement\u00e9es (immobilisations)": { + "Amortissements d\u00e9rogatoires": { + "account_number": "78725" + }, + "Provision sp\u00e9ciale de r\u00e9\u00e9valuation": { + "account_number": "78726" + }, + "Plus-values r\u00e9investies": { + "account_number": "78727" + }, + "account_number": "7872" + }, + "Reprises sur provisions r\u00e9glement\u00e9es (stocks)": { + "account_number": "7873" + }, + "Reprises sur autres provisions r\u00e9glement\u00e9es": { + "account_number": "7874" + }, + "Reprises sur provisions exceptionnelles": { + "account_number": "7875" + }, + "Reprises sur d\u00e9pr\u00e9ciations exceptionnelles": { + "account_number": "7876" + }, + "account_number": "787" + }, + "account_number": "78" + }, + "Transferts de charges": { + "Transferts de charges d'exploitation": { + "account_number": "791" + }, + "Transferts de charges financi\u00e8res": { + "account_number": "796" + }, + "Transferts de charges exceptionnelles": { + "account_number": "797" + }, + "account_number": "79" + }, + "account_number": "7" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/bank/bank.js b/erpnext/accounts/doctype/bank/bank.js index 6b221433aa3..9fa2083a355 100644 --- a/erpnext/accounts/doctype/bank/bank.js +++ b/erpnext/accounts/doctype/bank/bank.js @@ -109,5 +109,4 @@ erpnext.integrations.refreshPlaidLink = class refreshPlaidLink { plaid_success(token, response) { frappe.show_alert({ message: __('Plaid Link Updated'), indicator: 'green' }); } -}; - +}; \ No newline at end of file diff --git a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py index 43ebcb0cac9..729d4ae2368 100644 --- a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py +++ b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py @@ -7,19 +7,19 @@ DEFAULT_MAPPERS = [ 'section_header': 'Cash flows from operating activities', 'section_leader': 'Adjustments for', 'section_name': 'Operating Activities', - 'position': 0, + 'position': 1, 'section_subtotal': 'Cash generated from operations', }, { 'doctype': 'Cash Flow Mapper', - 'position': 1, + 'position': 2, 'section_footer': 'Net cash used in investing activities', 'section_header': 'Cash flows from investing activities', 'section_name': 'Investing Activities' }, { 'doctype': 'Cash Flow Mapper', - 'position': 2, + 'position': 3, 'section_footer': 'Net cash used in financing activites', 'section_header': 'Cash flows from financing activities', 'section_name': 'Financing Activities', diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index b4599ba0f46..7d4679690ea 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -97,8 +97,7 @@ class GLEntry(Document): def check_pl_account(self): if self.is_opening=='Yes' and \ - frappe.db.get_value("Account", self.account, "report_type")=="Profit and Loss" and \ - self.voucher_type not in ['Purchase Invoice', 'Sales Invoice']: + frappe.db.get_value("Account", self.account, "report_type")=="Profit and Loss": frappe.throw(_("{0} {1}: 'Profit and Loss' type account {2} not allowed in Opening Entry") .format(self.voucher_type, self.voucher_no, self.account)) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 709dccd2230..dbe8fe40923 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -29,7 +29,11 @@ class JournalEntry(AccountsController): self.validate_entries_for_advance() self.validate_multi_currency() self.set_amounts_in_company_currency() - self.validate_total_debit_and_credit() + + # Do not validate while importing via data import + if not frappe.flags.in_import: + self.validate_total_debit_and_credit() + self.validate_against_jv() self.validate_reference_doc() self.set_against_account() @@ -1047,4 +1051,4 @@ def make_reverse_journal_entry(source_name, target_doc=None): }, }, target_doc) - return doclist \ No newline at end of file + return doclist \ No newline at end of file diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index 0bd54cd6055..bd6acb8dcb5 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -1041,18 +1041,10 @@ frappe.ui.form.on('Payment Entry', { }, 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); - }, - () => { - if(frm.doc.payment_type != "Internal") { - frm.clear_table("references"); - } - } - ]); } } 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 d04f25b9aca..81bc03b3eda 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.json @@ -1,283 +1,95 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "ACC-PCV-.YYYY.-.#####", - "beta": 0, - "creation": "2013-01-10 16:34:07", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "editable_grid": 0, - "engine": "InnoDB", + "actions": [], + "autoname": "ACC-PCV-.YYYY.-.#####", + "creation": "2013-01-10 16:34:07", + "doctype": "DocType", + "engine": "InnoDB", + "field_order": [ + "transaction_date", + "posting_date", + "fiscal_year", + "amended_from", + "company", + "cost_center_wise_pnl", + "column_break1", + "closing_account_head", + "remarks" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "transaction_date", - "fieldtype": "Date", - "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": "Transaction Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "transaction_date", - "oldfieldtype": "Date", - "permlevel": 0, - "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": "transaction_date", + "fieldtype": "Date", + "label": "Transaction Date", + "oldfieldname": "transaction_date", + "oldfieldtype": "Date" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "posting_date", - "fieldtype": "Date", - "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": "Posting Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "posting_date", + "fieldtype": "Date", + "label": "Posting Date", + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "fiscal_year", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 1, - "label": "Closing Fiscal Year", - "length": 0, - "no_copy": 0, - "oldfieldname": "fiscal_year", - "oldfieldtype": "Select", - "options": "Fiscal Year", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "fiscal_year", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Closing Fiscal Year", + "oldfieldname": "fiscal_year", + "oldfieldtype": "Select", + "options": "Fiscal Year", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 1, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Amended From", - "length": 0, - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Data", - "options": "Period Closing Voucher", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Data", + "options": "Period Closing Voucher", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "company", - "fieldtype": "Link", - "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": "Company", - "length": 0, - "no_copy": 0, - "oldfieldname": "company", - "oldfieldtype": "Select", - "options": "Company", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Select", + "options": "Company", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break1", - "fieldtype": "Column 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, - "length": 0, - "no_copy": 0, - "oldfieldtype": "Column Break", - "permlevel": 0, - "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": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "The account head under Liability or Equity, in which Profit/Loss will be booked", - "fieldname": "closing_account_head", - "fieldtype": "Link", - "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": "Closing Account Head", - "length": 0, - "no_copy": 0, - "oldfieldname": "closing_account_head", - "oldfieldtype": "Link", - "options": "Account", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "description": "The account head under Liability or Equity, in which Profit/Loss will be booked", + "fieldname": "closing_account_head", + "fieldtype": "Link", + "label": "Closing Account Head", + "oldfieldname": "closing_account_head", + "oldfieldtype": "Link", + "options": "Account", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "remarks", - "fieldtype": "Small Text", - "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": "Remarks", - "length": 0, - "no_copy": 0, - "oldfieldname": "remarks", - "oldfieldtype": "Small Text", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "oldfieldname": "remarks", + "oldfieldtype": "Small Text", + "reqd": 1 + }, + { + "default": "0", + "fieldname": "cost_center_wise_pnl", + "fieldtype": "Check", + "label": "Book Cost Center-Wise Profit/Loss" } ], "has_web_view": 0, @@ -291,60 +103,43 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-08-21 16:15:49.089450", + "modified": "2021-05-20 15:27:37.210458", "modified_by": "Administrator", "module": "Accounts", "name": "Period Closing Voucher", "owner": "jai@webnotestech.com", "permissions": [ { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts Manager", + "share": 1, + "submit": 1, "write": 1 } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "search_fields": "posting_date, fiscal_year", - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "title_field": "closing_account_head", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 + ], + "search_fields": "posting_date, fiscal_year", + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "closing_account_head" } \ No newline at end of file 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 b59a177f43b..d479a968999 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -50,63 +50,96 @@ class PeriodClosingVoucher(AccountsController): def make_gl_entries(self): gl_entries = [] - net_pl_balance = 0 - dimension_fields = ['t1.cost_center'] + net_pl_balance = 0 - accounting_dimensions = get_accounting_dimensions() - for dimension in accounting_dimensions: - dimension_fields.append('t1.{0}'.format(dimension)) - - dimension_filters, default_dimensions = get_dimension_filters() - - pl_accounts = self.get_pl_balances(dimension_fields) + pl_accounts = self.get_pl_balances() for acc in pl_accounts: - if flt(acc.balance_in_company_currency): + if flt(acc.bal_in_company_currency): gl_entries.append(self.get_gl_dict({ "account": acc.account, "cost_center": acc.cost_center, "account_currency": acc.account_currency, - "debit_in_account_currency": abs(flt(acc.balance_in_account_currency)) \ - if flt(acc.balance_in_account_currency) < 0 else 0, - "debit": abs(flt(acc.balance_in_company_currency)) \ - if flt(acc.balance_in_company_currency) < 0 else 0, - "credit_in_account_currency": abs(flt(acc.balance_in_account_currency)) \ - if flt(acc.balance_in_account_currency) > 0 else 0, - "credit": abs(flt(acc.balance_in_company_currency)) \ - if flt(acc.balance_in_company_currency) > 0 else 0 + "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 }, item=acc)) - net_pl_balance += flt(acc.balance_in_company_currency) + net_pl_balance += flt(acc.bal_in_company_currency) if net_pl_balance: - cost_center = frappe.db.get_value("Company", self.company, "cost_center") - gl_entry = self.get_gl_dict({ - "account": self.closing_account_head, - "debit_in_account_currency": abs(net_pl_balance) if net_pl_balance > 0 else 0, - "debit": abs(net_pl_balance) if net_pl_balance > 0 else 0, - "credit_in_account_currency": abs(net_pl_balance) if net_pl_balance < 0 else 0, - "credit": abs(net_pl_balance) if net_pl_balance < 0 else 0, - "cost_center": cost_center - }) - - for dimension in accounting_dimensions: - gl_entry.update({ - dimension: default_dimensions.get(self.company, {}).get(dimension) - }) - - gl_entries.append(gl_entry) + if self.cost_center_wise_pnl: + costcenter_wise_gl_entries = self.get_costcenter_wise_pnl_gl_entries(pl_accounts) + gl_entries += costcenter_wise_gl_entries + else: + gl_entry = self.get_pnl_gl_entry(net_pl_balance) + gl_entries.append(gl_entry) from erpnext.accounts.general_ledger import make_gl_entries make_gl_entries(gl_entries) + + def get_pnl_gl_entry(self, net_pl_balance): + cost_center = frappe.db.get_value("Company", self.company, "cost_center") + gl_entry = self.get_gl_dict({ + "account": self.closing_account_head, + "debit_in_account_currency": abs(net_pl_balance) if net_pl_balance > 0 else 0, + "debit": abs(net_pl_balance) if net_pl_balance > 0 else 0, + "credit_in_account_currency": abs(net_pl_balance) if net_pl_balance < 0 else 0, + "credit": abs(net_pl_balance) if net_pl_balance < 0 else 0, + "cost_center": cost_center + }) + + self.update_default_dimensions(gl_entry) + + return gl_entry + + def get_costcenter_wise_pnl_gl_entries(self, pl_accounts): + company_cost_center = frappe.db.get_value("Company", self.company, "cost_center") + gl_entries = [] + + for acc in pl_accounts: + if flt(acc.bal_in_company_currency): + gl_entry = self.get_gl_dict({ + "account": self.closing_account_head, + "cost_center": acc.cost_center or company_cost_center, + "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 + }, item=acc) + + self.update_default_dimensions(gl_entry) + + gl_entries.append(gl_entry) + + return gl_entries + + def update_default_dimensions(self, gl_entry): + if not self.accounting_dimensions: + self.accounting_dimensions = get_accounting_dimensions() + + _, default_dimensions = get_dimension_filters() + for dimension in self.accounting_dimensions: + gl_entry.update({ + dimension: default_dimensions.get(self.company, {}).get(dimension) + }) + + def get_pl_balances(self): + """Get balance for dimension-wise pl accounts""" + + dimension_fields = ['t1.cost_center'] + + self.accounting_dimensions = get_accounting_dimensions() + for dimension in self.accounting_dimensions: + dimension_fields.append('t1.{0}'.format(dimension)) - def get_pl_balances(self, dimension_fields): - """Get balance for pl accounts""" return frappe.db.sql(""" select t1.account, t2.account_currency, {dimension_fields}, - sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) as balance_in_account_currency, - sum(t1.debit) - sum(t1.credit) as balance_in_company_currency + sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) as bal_in_account_currency, + sum(t1.debit) - sum(t1.credit) as bal_in_company_currency from `tabGL Entry` t1, `tabAccount` t2 where t1.account = t2.name and t2.report_type = 'Profit and Loss' and t2.docstatus < 2 and t2.company = %s 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 eb02d97b789..2f29372b01c 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 @@ -8,6 +8,7 @@ import frappe from frappe.utils import flt, today from erpnext.accounts.utils import get_fiscal_year, now from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice class TestPeriodClosingVoucher(unittest.TestCase): def test_closing_entry(self): @@ -65,6 +66,58 @@ class TestPeriodClosingVoucher(unittest.TestCase): self.assertEqual(gle_for_random_expense_account[0].amount_in_account_currency, -1*random_expense_account[0].balance_in_account_currency) + def test_cost_center_wise_posting(self): + frappe.db.sql("delete from `tabGL Entry` where company='Test PCV Company'") + + company = create_company() + surplus_account = create_account() + + cost_center1 = create_cost_center("Test Cost Center 1") + cost_center2 = create_cost_center("Test Cost Center 2") + + create_sales_invoice( + company=company, + cost_center=cost_center1, + income_account="Sales - TPC", + expense_account="Cost of Goods Sold - TPC", + rate=400, + debit_to="Debtors - TPC" + ) + create_sales_invoice( + company=company, + cost_center=cost_center2, + income_account="Sales - TPC", + expense_account="Cost of Goods Sold - TPC", + rate=200, + debit_to="Debtors - TPC" + ) + + pcv = frappe.get_doc({ + "transaction_date": today(), + "posting_date": today(), + "fiscal_year": get_fiscal_year(today())[0], + "company": "Test PCV Company", + "cost_center_wise_pnl": 1, + "closing_account_head": surplus_account, + "remarks": "Test", + "doctype": "Period Closing Voucher" + }) + pcv.insert() + pcv.submit() + + expected_gle = ( + ('Sales - TPC', 200.0, 0.0, cost_center2), + (surplus_account, 0.0, 200.0, cost_center2), + ('Sales - TPC', 400.0, 0.0, cost_center1), + (surplus_account, 0.0, 400.0, cost_center1) + ) + + pcv_gle = frappe.db.sql(""" + select account, debit, credit, cost_center from `tabGL Entry` where voucher_no=%s + """, (pcv.name)) + + self.assertTrue(pcv_gle, expected_gle) + def make_period_closing_voucher(self): pcv = frappe.get_doc({ "doctype": "Period Closing Voucher", @@ -80,6 +133,38 @@ class TestPeriodClosingVoucher(unittest.TestCase): return pcv +def create_company(): + company = frappe.get_doc({ + 'doctype': 'Company', + 'company_name': "Test PCV Company", + 'country': 'United States', + 'default_currency': 'USD' + }) + company.insert(ignore_if_duplicate = True) + return company.name + +def create_account(): + account = frappe.get_doc({ + "account_name": "Reserve and Surplus", + "is_group": 0, + "company": "Test PCV Company", + "root_type": "Liability", + "report_type": "Balance Sheet", + "account_currency": "USD", + "parent_account": "Current Liabilities - TPC", + "doctype": "Account" + }).insert(ignore_if_duplicate = True) + return account.name + +def create_cost_center(cc_name): + costcenter = frappe.get_doc({ + "company": "Test PCV Company", + "cost_center_name": cc_name, + "doctype": "Cost Center", + "parent_cost_center": "Test PCV Company - TPC" + }) + costcenter.insert(ignore_if_duplicate = True) + return costcenter.name test_dependencies = ["Customer", "Cost Center"] test_records = frappe.get_test_records("Period Closing Voucher") diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index fb2f9ff8991..c9a820e2e27 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -467,7 +467,7 @@ def apply_pricing_rule_on_transaction(doc): if not d.get(pr_field): continue - if d.validate_applied_rule and doc.get(field) < d.get(pr_field): + if d.validate_applied_rule and doc.get(field) is not None and doc.get(field) < d.get(pr_field): frappe.msgprint(_("User has not applied rule on the invoice {0}") .format(doc.name)) else: diff --git a/erpnext/accounts/doctype/purchase_invoice/test_records.json b/erpnext/accounts/doctype/purchase_invoice/test_records.json index 171927c1822..2a8c97b0ecf 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_records.json +++ b/erpnext/accounts/doctype/purchase_invoice/test_records.json @@ -43,7 +43,7 @@ } ], "grand_total": 0, - "naming_series": "_T-BILL", + "naming_series": "T-PINV-", "taxes": [ { "account_head": "_Test Account Shipping Charges - _TC", @@ -168,7 +168,7 @@ } ], "grand_total": 0, - "naming_series": "_T-Purchase Invoice-", + "naming_series": "T-PINV-", "taxes": [ { "account_head": "_Test Account Shipping Charges - _TC", diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 124daa36be3..3e341ff0c6d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -450,7 +450,7 @@ class SalesInvoice(SellingController): # set pos values in items for item in self.get("items"): if item.get('item_code'): - profile_details = get_pos_profile_item_details(pos, frappe._dict(item.as_dict()), pos) + profile_details = get_pos_profile_item_details(pos, frappe._dict(item.as_dict()), pos, update_data=True) for fname, val in iteritems(profile_details): if (not for_validate) or (for_validate and not item.get(fname)): item.set(fname, val) @@ -539,7 +539,7 @@ 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, + self.remarks = _("Against Customer Order {0} dated {1}").format(self.po_no, formatdate(self.po_date)) else: self.remarks = _("No Remarks") diff --git a/erpnext/accounts/doctype/sales_invoice/test_records.json b/erpnext/accounts/doctype/sales_invoice/test_records.json index 11ebe6a573a..5fad6e263e3 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_records.json +++ b/erpnext/accounts/doctype/sales_invoice/test_records.json @@ -30,7 +30,7 @@ "base_grand_total": 561.8, "grand_total": 561.8, "is_pos": 0, - "naming_series": "_T-Sales Invoice-", + "naming_series": "T-SINV-", "base_net_total": 500.0, "taxes": [ { @@ -103,7 +103,7 @@ "base_grand_total": 630.0, "grand_total": 630.0, "is_pos": 0, - "naming_series": "_T-Sales Invoice-", + "naming_series": "T-SINV-", "base_net_total": 500.0, "taxes": [ { @@ -174,7 +174,7 @@ ], "grand_total": 0, "is_pos": 0, - "naming_series": "_T-Sales Invoice-", + "naming_series": "T-SINV-", "taxes": [ { "account_head": "_Test Account Shipping Charges - _TC", @@ -300,7 +300,7 @@ ], "grand_total": 0, "is_pos": 0, - "naming_series": "_T-Sales Invoice-", + "naming_series": "T-SINV-", "taxes": [ { "account_head": "_Test Account Excise Duty - _TC", diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 4db739e09df..a5efe546dda 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -1860,7 +1860,17 @@ class TestSalesInvoice(unittest.TestCase): def test_einvoice_submission_without_irn(self): # init - frappe.db.set_value('E Invoice Settings', 'E Invoice Settings', 'enable', 1) + einvoice_settings = frappe.get_doc('E Invoice Settings') + einvoice_settings.enable = 1 + einvoice_settings.applicable_from = nowdate() + einvoice_settings.append('credentials', { + 'company': '_Test Company', + 'gstin': '27AAECE4835E1ZR', + 'username': 'test', + 'password': 'test' + }) + einvoice_settings.save() + country = frappe.flags.country frappe.flags.country = 'India' @@ -1871,7 +1881,8 @@ class TestSalesInvoice(unittest.TestCase): si.submit() # reset - frappe.db.set_value('E Invoice Settings', 'E Invoice Settings', 'enable', 0) + einvoice_settings = frappe.get_doc('E Invoice Settings') + einvoice_settings.enable = 0 frappe.flags.country = country def test_einvoice_json(self): @@ -2063,6 +2074,7 @@ def create_sales_invoice(**args): si.return_against = args.return_against si.currency=args.currency or "INR" si.conversion_rate = args.conversion_rate or 1 + si.naming_series = args.naming_series or "T-SINV-" si.append("items", { "item_code": args.item or args.item_code or "_Test Item", diff --git a/erpnext/accounts/doctype/share_transfer/share_transfer.py b/erpnext/accounts/doctype/share_transfer/share_transfer.py index 65f248e7bde..e9e06841a29 100644 --- a/erpnext/accounts/doctype/share_transfer/share_transfer.py +++ b/erpnext/accounts/doctype/share_transfer/share_transfer.py @@ -169,7 +169,7 @@ class ShareTransfer(Document): def folio_no_validation(self): shareholders = ['from_shareholder', 'to_shareholder'] - shareholders = [shareholder for shareholder in shareholders if self.get(shareholder) is not ''] + shareholders = [shareholder for shareholder in shareholders if self.get(shareholder) != ''] for shareholder in shareholders: doc = self.get_shareholder_doc(self.get(shareholder)) if doc.company != self.company: diff --git a/erpnext/accounts/doctype/subscription/subscription.json b/erpnext/accounts/doctype/subscription/subscription.json index fb5bb4839c4..bbe8cca9152 100644 --- a/erpnext/accounts/doctype/subscription/subscription.json +++ b/erpnext/accounts/doctype/subscription/subscription.json @@ -30,6 +30,7 @@ "additional_discount_percentage", "additional_discount_amount", "sb_3", + "submit_invoice", "invoices", "accounting_dimensions_section", "dimension_col_break" @@ -202,9 +203,15 @@ "fieldname": "generate_new_invoices_past_due_date", "fieldtype": "Check", "label": "Generate New Invoices Past Due Date" + }, + { + "default": "1", + "fieldname": "submit_invoice", + "fieldtype": "Check", + "label": "Submit Invoice Automatically" } ], - "modified": "2020-11-29 22:46:14.879289", + "modified": "2021-05-03 13:35:21.422940", "modified_by": "Administrator", "module": "Accounts", "name": "Subscription", diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 07fc68334a8..1abb93464b0 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -289,7 +289,9 @@ class Subscription(Document): invoice.flags.ignore_mandatory = True invoice.save() - invoice.submit() + + if self.submit_invoice: + invoice.submit() return invoice diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index f6a7218d601..05ecbc9677b 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -163,7 +163,7 @@ def get_tds_amount(suppliers, net_total, company, tax_details, fiscal_year_detai debit_note_amount = get_debit_note_amount(suppliers, year_start_date, year_end_date) supplier_credit_amount -= debit_note_amount - if ((tax_details.get('threshold', 0) and supplier_credit_amount >= tax_details.threshold) + if ((tax_details.get('threshold', 0) and net_total >= tax_details.threshold) or (tax_details.get('cumulative_threshold', 0) and supplier_credit_amount >= tax_details.cumulative_threshold)): if ldc and is_valid_certificate(ldc.valid_from, ldc.valid_upto, posting_date, tds_deducted, net_total, 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 a0b0cbb9956..a0b02bccf10 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 @@ -83,47 +83,6 @@ class TestTaxWithholdingCategory(unittest.TestCase): for d in invoices: d.cancel() - def test_single_threshold_tds_with_previous_vouchers(self): - invoices = [] - frappe.db.set_value("Supplier", "Test TDS Supplier2", "tax_withholding_category", "Single Threshold TDS") - pi = create_purchase_invoice(supplier="Test TDS Supplier2") - pi.submit() - invoices.append(pi) - - pi = create_purchase_invoice(supplier="Test TDS Supplier2") - pi.submit() - invoices.append(pi) - - self.assertEqual(pi.taxes_and_charges_deducted, 2000) - self.assertEqual(pi.grand_total, 8000) - - # delete invoices to avoid clashing - for d in invoices: - d.cancel() - - def test_single_threshold_tds_with_previous_vouchers_and_no_tds(self): - invoices = [] - frappe.db.set_value("Supplier", "Test TDS Supplier2", "tax_withholding_category", "Single Threshold TDS") - pi = create_purchase_invoice(supplier="Test TDS Supplier2") - pi.submit() - invoices.append(pi) - - # TDS not applied - pi = create_purchase_invoice(supplier="Test TDS Supplier2", do_not_apply_tds=True) - pi.submit() - invoices.append(pi) - - pi = create_purchase_invoice(supplier="Test TDS Supplier2") - pi.submit() - invoices.append(pi) - - self.assertEqual(pi.taxes_and_charges_deducted, 2000) - self.assertEqual(pi.grand_total, 8000) - - # delete invoices to avoid clashing - for d in invoices: - d.cancel() - def create_purchase_invoice(**args): # return sales invoice doc object item = frappe.get_doc('Item', {'item_name': 'TDS Item'}) diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 8d265080747..f42899ab5d9 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -240,10 +240,10 @@ def make_round_off_gle(gl_map, debit_credit_diff, precision): for d in gl_map: if d.account == round_off_account: round_off_gle = d - if d.debit_in_account_currency: - debit_credit_diff -= flt(d.debit_in_account_currency) + if d.debit: + debit_credit_diff -= flt(d.debit) else: - debit_credit_diff += flt(d.credit_in_account_currency) + debit_credit_diff += flt(d.credit) round_off_account_exists = True if round_off_account_exists and abs(debit_credit_diff) <= (1.0 / (10**precision)): diff --git a/erpnext/accounts/report/cash_flow/custom_cash_flow.py b/erpnext/accounts/report/cash_flow/custom_cash_flow.py index 8566f5375ad..9907dde5482 100644 --- a/erpnext/accounts/report/cash_flow/custom_cash_flow.py +++ b/erpnext/accounts/report/cash_flow/custom_cash_flow.py @@ -165,7 +165,7 @@ def add_data_for_operating_activities( if profit_data: profit_data.update({ "indent": 1, - "parent_account": get_mapper_for(light_mappers, position=0)['section_header'] + "parent_account": get_mapper_for(light_mappers, position=1)['section_header'] }) data.append(profit_data) section_data.append(profit_data) @@ -312,10 +312,10 @@ def add_data_for_other_activities( def compute_data(filters, company_currency, profit_data, period_list, light_mappers, full_mapper): data = [] - operating_activities_mapper = get_mapper_for(light_mappers, position=0) + operating_activities_mapper = get_mapper_for(light_mappers, position=1) other_mappers = [ - get_mapper_for(light_mappers, position=1), - get_mapper_for(light_mappers, position=2) + get_mapper_for(light_mappers, position=2), + get_mapper_for(light_mappers, position=3) ] if operating_activities_mapper: @@ -396,7 +396,7 @@ def _get_account_type_based_data(filters, account_names, period_list, accumulate gl_sum = frappe.db.sql_list(""" select sum(credit) - sum(debit) from `tabGL Entry` - where company=%s and posting_date >= %s and posting_date <= %s + where company=%s and posting_date >= %s and posting_date <= %s and voucher_type != 'Period Closing Voucher' and account in ( SELECT name FROM tabAccount WHERE name IN (%s) OR parent_account IN (%s)) @@ -405,7 +405,7 @@ def _get_account_type_based_data(filters, account_names, period_list, accumulate gl_sum = frappe.db.sql_list(""" select sum(credit) - sum(debit) from `tabGL Entry` - where company=%s and posting_date >= %s and posting_date <= %s + where company=%s and posting_date >= %s and posting_date <= %s and voucher_type != 'Period Closing Voucher' and account in ( SELECT name FROM tabAccount WHERE name IN (%s) OR parent_account IN (%s)) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js index 84480468dad..2c48b7995bf 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.js +++ b/erpnext/buying/doctype/purchase_order/purchase_order.js @@ -355,7 +355,7 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend( material_request_type: "Purchase", docstatus: 1, status: ["!=", "Stopped"], - per_ordered: ["<", 99.99], + per_ordered: ["<", 100], } }) }, __("Get items from")); diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index c7efb8a1a17..a2290170bd8 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -366,7 +366,6 @@ def make_purchase_receipt(source_name, target_doc=None): "Purchase Order": { "doctype": "Purchase Receipt", "field_map": { - "per_billed": "per_billed", "supplier_warehouse":"supplier_warehouse" }, "validation": { 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 4a937f7f0d3..d284e2ef318 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js @@ -271,7 +271,7 @@ erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.e material_request_type: "Purchase", docstatus: 1, status: ["!=", "Stopped"], - per_ordered: ["<", 99.99] + per_ordered: ["<", 100] } }) }, __("Get items from")); @@ -316,7 +316,7 @@ erpnext.buying.RequestforQuotationController = erpnext.buying.BuyingController.e material_request_type: "Purchase", docstatus: 1, status: ["!=", "Stopped"], - per_ordered: ["<", 99.99] + per_ordered: ["<", 100] } }); $(btn).done_working(); 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 bef2965bf02..51af59f5eeb 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -279,19 +279,21 @@ def add_items(sq_doc, supplier, items): create_rfq_items(sq_doc, supplier, data) def create_rfq_items(sq_doc, supplier, data): - sq_doc.append('items', { - "item_code": data.item_code, - "item_name": data.item_name, - "description": data.description, - "qty": data.qty, - "rate": data.rate, - "conversion_factor": data.conversion_factor if data.conversion_factor else None, - "supplier_part_no": frappe.db.get_value("Item Supplier", {'parent': data.item_code, 'supplier': supplier}, "supplier_part_no"), - "warehouse": data.warehouse or '', + args = {} + + for field in ['item_code', 'item_name', 'description', 'qty', 'rate', 'conversion_factor', + 'warehouse', 'material_request', 'material_request_item', 'stock_qty']: + args[field] = data.get(field) + + args.update({ "request_for_quotation_item": data.name, - "request_for_quotation": data.parent + "request_for_quotation": data.parent, + "supplier_part_no": frappe.db.get_value("Item Supplier", + {'parent': data.item_code, 'supplier': supplier}, "supplier_part_no") }) + sq_doc.append('items', args) + @frappe.whitelist() def get_pdf(doctype, name, supplier_idx): doc = get_rfq_doc(doctype, name, supplier_idx) diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js index 16061c61ba0..2fae2572a9b 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js @@ -46,7 +46,7 @@ erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.ext material_request_type: "Purchase", docstatus: 1, status: ["!=", "Stopped"], - per_ordered: ["<", 99.99] + per_ordered: ["<", 100] } }) }, __("Get items from")); diff --git a/erpnext/change_log/v12/v12_10_0.md b/erpnext/change_log/v12/v12_10_0.md new file mode 100644 index 00000000000..07aa885ec82 --- /dev/null +++ b/erpnext/change_log/v12/v12_10_0.md @@ -0,0 +1,54 @@ +## ERPNext v12.10.0 Release Note + +### Enhancements + +- Create Shipping Address and Contact in ERPNext from the woocommerece platform ([#21654](https://github.com/frappe/erpnext/pull/21654)) +- Dashboard in Course and Assessment Plan ([#21889](https://github.com/frappe/erpnext/pull/21889)) +- Added conversion factor for pound, gram to Ounce ([#21710](https://github.com/frappe/erpnext/pull/21710)) +- Allowed renaming for Sales Stage ([#21800](https://github.com/frappe/erpnext/pull/21800)) +- Add filter for cost center in expense table ([#22209](https://github.com/frappe/erpnext/pull/22209)) +- Project filter in Trial Balance Report ([#21815](https://github.com/frappe/erpnext/pull/21815)) +- Added column Expired Leave in Leave Application dashboard ([#21859](https://github.com/frappe/erpnext/pull/21859)) +- Auto set serial nos and batches only if allowed in Stock Settings ([#21779](https://github.com/frappe/erpnext/pull/21779)) +- Filter batches based on selected item and warehouse in Pick List ([#21778](https://github.com/frappe/erpnext/pull/21778)) +- Errored documents handling while migrating data from Tally ([#22079](https://github.com/frappe/erpnext/pull/22079)) + +### Fixes + +- Routing operations table is blank on pull of operations in BOM ([#22040](https://github.com/frappe/erpnext/pull/22040)) +- Cannot make payment entry against shareholder ([#21597](https://github.com/frappe/erpnext/pull/21597)) +- Do not add filters in report on accounting dimension creation if it already exists ([#21941](https://github.com/frappe/erpnext/pull/21941)) +- Post Dated unallocated amount not considered in Advance Amount in AR/AP summary ([#21838](https://github.com/frappe/erpnext/pull/21838)) +- Check for Company before rendering tree in Account Tree ([#22204](https://github.com/frappe/erpnext/pull/22204)) +- Loyalty point entry use wrong tier ([#22168](https://github.com/frappe/erpnext/pull/22168)) +- Added Inactive serial no status ([#21849](https://github.com/frappe/erpnext/pull/21849)) +- Routing operations not added sequentially in the BOM ([#22110](https://github.com/frappe/erpnext/pull/22110)) +- TDS computation summary report ([#21987](https://github.com/frappe/erpnext/pull/21987)) +- Validate Payment Gateway only if it exists in Payment Request. ([#21806](https://github.com/frappe/erpnext/pull/21806)) +- Finished Product Valuation at Repack ([#22148](https://github.com/frappe/erpnext/pull/22148)) +- Wrong Ordered-Status Indicator for Material Request Items ([#22117](https://github.com/frappe/erpnext/pull/22117)) +- In-state Invoice not appearing in GSTR-1 report (India) ([#21787](https://github.com/frappe/erpnext/pull/21787)) +- Tax amount in GSTR-1 JSON (India) ([#21791](https://github.com/frappe/erpnext/pull/21791)) +- Fetch depreciation amount only if depreciation entry is made ([#21894](https://github.com/frappe/erpnext/pull/21894)) +- Throw error if no serial numbers are found in Pick List ([#21914](https://github.com/frappe/erpnext/pull/21914)) +- Shopify error message on failure of sales order creation ([#21924](https://github.com/frappe/erpnext/pull/21924)) +- Don't prompt for Quality Inspection on Return Documents. ([#22200](https://github.com/frappe/erpnext/pull/22200)) +- Item tax template not getting mapped from source to target doc ([#21863](https://github.com/frappe/erpnext/pull/21863)) +- Create purchase invoice from purchase receipt dashboard ([#22087](https://github.com/frappe/erpnext/pull/22087)) +- Procurement Tracker Data Consistency ([#22062](https://github.com/frappe/erpnext/pull/22062)) +- Cannot assign same task to other asset maintenance ([#22024](https://github.com/frappe/erpnext/pull/22024)) +- Incorrect VAT rate display in Sales Invoice (UAE) ([#21883](https://github.com/frappe/erpnext/pull/21883)) +- Missing income account when getting free product ([#22158](https://github.com/frappe/erpnext/pull/22158)) +- Item tax template not applied if valid from is blank ([#21819](https://github.com/frappe/erpnext/pull/21819)) +- Tax ID is not fetched when creating Sales Order from Quotation ([#21786](https://github.com/frappe/erpnext/pull/21786)) +- Disposed asset creates inconsistencies in asset depreciation report ([#22021](https://github.com/frappe/erpnext/pull/22021)) +- Submitted sales order can be updated with proper permission ([#22218](https://github.com/frappe/erpnext/pull/22218)) +- Import supplier invoice not working ([#22108](https://github.com/frappe/erpnext/pull/22108)) +- Showing Wrong balance on allocation boundary dates ([#21908](https://github.com/frappe/erpnext/pull/21908)) +- Fetch customer into Delivery Note from Pick List ([#21825](https://github.com/frappe/erpnext/pull/21825)) +- Apply shipping rule without address ([#22093](https://github.com/frappe/erpnext/pull/22093)) +- Prioritize Default Customer Price List in Portal ([#22183](https://github.com/frappe/erpnext/pull/22183)) +- Supplier Invoice No not fetched in Import Supplier Invoice ([#21829](https://github.com/frappe/erpnext/pull/21829)) +- Item Price and Add to Cart not showing on Website ([#21905](https://github.com/frappe/erpnext/pull/21905)) +- Make transaction date of the oldest transaction as the last integration date ([#22017](https://github.com/frappe/erpnext/pull/22017)) +- Misleading Error message for Item Attribute ([#22068](https://github.com/frappe/erpnext/pull/22068)) diff --git a/erpnext/change_log/v12/v12_11_0.md b/erpnext/change_log/v12/v12_11_0.md new file mode 100644 index 00000000000..30d93a31af8 --- /dev/null +++ b/erpnext/change_log/v12/v12_11_0.md @@ -0,0 +1,66 @@ +## ERPNext v12.11.0 Release Note + +- Enabled translation on html files in LMS [Proposal] ([#21582](https://github.com/frappe/erpnext/pull/21582)) +- Multi UOM support in Request for Quotation ([#22250](https://github.com/frappe/erpnext/pull/22250)) +- Exploded Item Rate ([#22816](https://github.com/frappe/erpnext/pull/22816)) +- asset maintenance fixes ([#21277](https://github.com/frappe/erpnext/pull/21277)) +- Error due to comma in Pricing rule name ([#22927](https://github.com/frappe/erpnext/pull/22927)) +- Set default reference Id for "On Previous Row Amount" and "On Previous Row Total" ([#22387](https://github.com/frappe/erpnext/pull/22387)) +- fix(Education): course wise assessment report labels ([#22805](https://github.com/frappe/erpnext/pull/22805)) +- ewaybill json had json dump of json dump, and other related fixes ([#22656](https://github.com/frappe/erpnext/pull/22656)) +- Unable to change link from new lead to existing customer ([#22795](https://github.com/frappe/erpnext/pull/22795)) +- Incorrect delivered qty in Supplier-Wise Sales Analytics ([#22642](https://github.com/frappe/erpnext/pull/22642)) +- Dont merge items if both exist in stock reco ([#22784](https://github.com/frappe/erpnext/pull/22784)) +- Status error in purchase invoice ([#22389](https://github.com/frappe/erpnext/pull/22389)) +- Whitelist all query functions for search widget ([#22606](https://github.com/frappe/erpnext/pull/22606)) +- SQL query in accounts receivable, payable reports ([#22891](https://github.com/frappe/erpnext/pull/22891)) +- In POS serial no popup coming two times ([#22268](https://github.com/frappe/erpnext/pull/22268)) +- Cannot cancel assets with repair pending (bp #22440) ([#22453](https://github.com/frappe/erpnext/pull/22453)) +- Take parent cost center for child if no cost center at child ([#22496](https://github.com/frappe/erpnext/pull/22496)) +- Handle nonetype issue for packed items ([#22493](https://github.com/frappe/erpnext/pull/22493)) +- Cannot cancel assets with repair pending ([#22440](https://github.com/frappe/erpnext/pull/22440)) +- Show or hide section or attributes depending on other attributes… ([#22933](https://github.com/frappe/erpnext/pull/22933)) +- Insert Supplier Group via List View (bp #22403) ([#22407](https://github.com/frappe/erpnext/pull/22407)) +- Skip Progress and Completed by fields on Task Duplication ([#22640](https://github.com/frappe/erpnext/pull/22640)) +- Incorrect variable used while adding new item in the submitted Sales Order ([#22308](https://github.com/frappe/erpnext/pull/22308)) +- Incorrect stock value in return case ([#22528](https://github.com/frappe/erpnext/pull/22528)) +- staffing Plan validation ([#22379](https://github.com/frappe/erpnext/pull/22379)) +- Cancellation of accounting transactions within closed accounting period ([#22986](https://github.com/frappe/erpnext/pull/22986)) +- Not able to submit sales invoice ([#22699](https://github.com/frappe/erpnext/pull/22699)) +- Offline pos not working for special character item ([#22391](https://github.com/frappe/erpnext/pull/22391)) +- Due to decimal issue make purchase receipt button not showing in Purchase Order ([#22643](https://github.com/frappe/erpnext/pull/22643)) +- Stock Reconciliation Invalid Quantity for Batched Item ([#22716](https://github.com/frappe/erpnext/pull/22716)) +- Quality procedure fixes ([#22287](https://github.com/frappe/erpnext/pull/22287)) +- Set label if domains is set ([#22523](https://github.com/frappe/erpnext/pull/22523)) +- Update item tax only if item code available ([#22575](https://github.com/frappe/erpnext/pull/22575)) +- Inclusive tax based on item quantity ([#23015](https://github.com/frappe/erpnext/pull/23015)) +- Quotation lost reason options fix ([#23016](https://github.com/frappe/erpnext/pull/23016)) +- GSTR 1 report for exports without payment of Tax ([#22968](https://github.com/frappe/erpnext/pull/22968)) +- Period list fixes in financial statements ([#22679](https://github.com/frappe/erpnext/pull/22679)) +- Don't set asset maintenance log status as Overdue when Completed or Cancelled ([#23012](https://github.com/frappe/erpnext/pull/23012)) +- Update state code and union territory for Daman and Diu ([#22989](https://github.com/frappe/erpnext/pull/22989)) +- Set Root as Parent if no parent in new tree view node ([#22507](https://github.com/frappe/erpnext/pull/22507)) +- Serial no / batch no Popup is coming for the non serialized items ([#22362](https://github.com/frappe/erpnext/pull/22362)) +- update shopify api version ([#22284](https://github.com/frappe/erpnext/pull/22284)) +- Unable to create batched item ([#22332](https://github.com/frappe/erpnext/pull/22332)) +- Incorrect balance qty in stock ledger report ([#22649](https://github.com/frappe/erpnext/pull/22649)) +- Setup status indicators for Job Offer and Job Applicant (v12) ([#22444](https://github.com/frappe/erpnext/pull/22444)) +- Set half day date None if half day is unchecked ([#22905](https://github.com/frappe/erpnext/pull/22905)) +- Completed qty not updated in work order ([#22372](https://github.com/frappe/erpnext/pull/22372)) +- Handling Empty tables in Production Plan ([#22469](https://github.com/frappe/erpnext/pull/22469)) +- Fetch project-related info in Timesheet (v12) ([#22422](https://github.com/frappe/erpnext/pull/22422)) +- Pricing Rule breaks if no item_code ([#22653](https://github.com/frappe/erpnext/pull/22653)) +- Made "Subscription Section", "Auto Repeat" and Hub Publishing" c… ([#22535](https://github.com/frappe/erpnext/pull/22535)) +- Update Packed Items via Update Items in SO ([#22404](https://github.com/frappe/erpnext/pull/22404)) +- Do not add tax amount in grand total for reverse charge invoices ([#22686](https://github.com/frappe/erpnext/pull/22686)) +- Other charges on income tax in salary slip ([#22798](https://github.com/frappe/erpnext/pull/22798)) +- Serial No Rename does not affect Stock Ledger Entry ([#22780](https://github.com/frappe/erpnext/pull/22780)) +- Quotation list view blank if quotation_to field not set as a standard filter ([#22659](https://github.com/frappe/erpnext/pull/22659)) +- cannot change customer fields if credit exhausted ([#22838](https://github.com/frappe/erpnext/pull/22838)) +- Project link not set in accounts other than profit and loss accounts ([#22049](https://github.com/frappe/erpnext/pull/22049)) +- Bank Clearance of POS purchase invoice ([#22884](https://github.com/frappe/erpnext/pull/22884)) +- Multiple GST fixes ([#22730](https://github.com/frappe/erpnext/pull/22730)) +- Add default cost center in payment reconciliation JV ([#22930](https://github.com/frappe/erpnext/pull/22930)) +- Do not copy Item Tax template from SO to PO ([#22324](https://github.com/frappe/erpnext/pull/22324)) +- Tax amounts in HSN Wise Outward summary ([#22755](https://github.com/frappe/erpnext/pull/22755)) +- Multi currency payment reconciliation ([#22928](https://github.com/frappe/erpnext/pull/22928)) diff --git a/erpnext/change_log/v12/v12_12_0.md b/erpnext/change_log/v12/v12_12_0.md new file mode 100644 index 00000000000..9d465816cdf --- /dev/null +++ b/erpnext/change_log/v12/v12_12_0.md @@ -0,0 +1,50 @@ +## ERPNext v12.12.0 Release Note + +### Fixes and Enhancements + +- Unable to submit reverse charge invoice ([#23103](https://github.com/frappe/erpnext/pull/23103)) +- Total calculations for multi-currency RCM invoices ([#23070](https://github.com/frappe/erpnext/pull/23070)) +- Cannot search items in offline pos ([#23083](https://github.com/frappe/erpnext/pull/23083)) +- Check Company in Payment Entry before selecting values ([#23421](https://github.com/frappe/erpnext/pull/23421)) +- Set cost center for payroll payable account ([#23223](https://github.com/frappe/erpnext/pull/23223)) +- Download Required Materials not working for production plan ([#23404](https://github.com/frappe/erpnext/pull/23404)) +- Not able to make material request from SO ([#23262](https://github.com/frappe/erpnext/pull/23262)) +- Profit and loss report not working ([#23254](https://github.com/frappe/erpnext/pull/23254)) +- Get Items from Product Bundle in Purchase Order ([#23228](https://github.com/frappe/erpnext/pull/23228)) +- Pricing Rule encoding fixed ([#23146](https://github.com/frappe/erpnext/pull/23146)) +- Create Opoortunity without Default Company from Email ([#23098](https://github.com/frappe/erpnext/pull/23098)) +- Incorrect consumed qty if raw material with batch ([#23390](https://github.com/frappe/erpnext/pull/23390)) +- Book loss amount in the COGS instead of stock received but not billed ([#23414](https://github.com/frappe/erpnext/pull/23414)) +- Conversion factor for BOM exploded item rate ([#23153](https://github.com/frappe/erpnext/pull/23153)) +- Don't overwrite patient appointment duration if already specified ([#23169](https://github.com/frappe/erpnext/pull/23169)) +- General Ledger filter validation ([#23230](https://github.com/frappe/erpnext/pull/23230)) +- BOM Update Tool failing due to Too Many Writes error ([#23191](https://github.com/frappe/erpnext/pull/23191)) +- Check for Company before trying to fetch party details ([#23206](https://github.com/frappe/erpnext/pull/23206)) +- Handled condition if staffing isn't created ([#23057](https://github.com/frappe/erpnext/pull/23057)) +- Unlink and delete batch created from stock reconciliation on cancel ([#23192](https://github.com/frappe/erpnext/pull/23192)) +- Mixed condition pricing rule not working on js side ([#23160](https://github.com/frappe/erpnext/pull/23160)) +- Form dashboard showing wrong balance ([#23131](https://github.com/frappe/erpnext/pull/23131)) +- Attendance calendar map fix ([#23247](https://github.com/frappe/erpnext/pull/23247)) +- Misleading filters on Item tax Template Link field ([#23246](https://github.com/frappe/erpnext/pull/23246)) +- Leave application status fix ([#23043](https://github.com/frappe/erpnext/pull/23043)) +- Stock qty in HSN wise outward summary ([#23252](https://github.com/frappe/erpnext/pull/23252)) +- Online pos print not working ([#23378](https://github.com/frappe/erpnext/pull/23378)) +- GLE for subcontracted PR is fg item rate is zero ([#23117](https://github.com/frappe/erpnext/pull/23117)) +- User-created manual job card not linking job card operation with work order operation ([#23126](https://github.com/frappe/erpnext/pull/23126)) +- Stock reconciliation, incorrect serial nos fetched in the current serial no field ([#23368](https://github.com/frappe/erpnext/pull/23368)) +- Incorrect stock balance issue for batched item ([#23186](https://github.com/frappe/erpnext/pull/23186)) +- Showing a negative balance in expired leaves ([#23428](https://github.com/frappe/erpnext/pull/23428)) +- Production plan incorrect work order qty ([#23264](https://github.com/frappe/erpnext/pull/23264)) +- Validate Job offer against vacancies ([#23107](https://github.com/frappe/erpnext/pull/23107)) +- Incorrect completed qty against the operation in a work order if the workstation is different in job card ([#23215](https://github.com/frappe/erpnext/pull/23215)) +- Incorrect job card timer issue ([#23226](https://github.com/frappe/erpnext/pull/23226)) +- Consumed qty logic for subcontracted raw materials ([#23314](https://github.com/frappe/erpnext/pull/23314)) +- Update paid amount for pos return ([#23124](https://github.com/frappe/erpnext/pull/23124)) +- Asset movement date for backdated asset entry ([#23300](https://github.com/frappe/erpnext/pull/23300)) +- JSON download for HSN wise outward summary ([#23081](https://github.com/frappe/erpnext/pull/23081)) +- Purchase order updates are not tracked ([#23325](https://github.com/frappe/erpnext/pull/23325)) +- Allowed to rename lead ([#23113](https://github.com/frappe/erpnext/pull/23113)) +- Add company in list fields to fetch for Expense Claim ([#23021](https://github.com/frappe/erpnext/pull/23021)) +- Events not deleted on canceling maintenance schedule ([#23219](https://github.com/frappe/erpnext/pull/23219)) +- Update items in Sales/Purchase Order with workflow ([#23324](https://github.com/frappe/erpnext/pull/23324)) +- Lock row in subquery while setting delivered qty ([#23101](https://github.com/frappe/erpnext/pull/23101)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_13_0.md b/erpnext/change_log/v12/v12_13_0.md new file mode 100644 index 00000000000..73054e90cc8 --- /dev/null +++ b/erpnext/change_log/v12/v12_13_0.md @@ -0,0 +1,51 @@ +## ERPNext v12.13.0 Release Note + +### Fixes and Enhancements + +- Warehouse address filtered based on warehouse ([#23381](https://github.com/frappe/erpnext/pull/23381)) +- COGS validation in the purchase receipt ([#23536](https://github.com/frappe/erpnext/pull/23536)) +- Item Tax Updating via `Update Items` in SO/PO ([#23338](https://github.com/frappe/erpnext/pull/23338)) +- Pricing rule selector is wrong ([#22328](https://github.com/frappe/erpnext/pull/22328)) +- Adding filters validation Batch-Wise Balance History ([#23396](https://github.com/frappe/erpnext/pull/23396)) +- Add company and correct filter in bank statement reconciliation report filters ([#23618](https://github.com/frappe/erpnext/pull/23618)) +- Incorrect consumed qty if raw material with batch ([#23389](https://github.com/frappe/erpnext/pull/23389)) +- Balance serial nos in stock ledger report ([#23520](https://github.com/frappe/erpnext/pull/23520)) +- Use Plaid's new API (v12) ([#23317](https://github.com/frappe/erpnext/pull/23317)) +- Cost Center filter in accounts receivable and payable report ([#23356](https://github.com/frappe/erpnext/pull/23356)) +- Incorrect operation time calculation for batch size ([#23480](https://github.com/frappe/erpnext/pull/23480)) +- Serial no field is blank in stock reconciliation ([#23648](https://github.com/frappe/erpnext/pull/23648)) +- Manually set serial nos override with current available serial nos ([#23657](https://github.com/frappe/erpnext/pull/23657)) +- Can't save item price after adding child table ([#23594](https://github.com/frappe/erpnext/pull/23594)) +- Naming series - cannot reset current value to zero ([#23505](https://github.com/frappe/erpnext/pull/23505)) +- TDS calculation, skip invoices with "Apply Tax Withholding Amount" has disabled ([#23463](https://github.com/frappe/erpnext/pull/23463)) +- Taxes not getting fetched from Opportunity to Quotation ([#23354](https://github.com/frappe/erpnext/pull/23354)) +- Stock reconciliation, incorrect serial nos fetched in the current serial no field ([#23366](https://github.com/frappe/erpnext/pull/23366)) +- Cannot create asset if cwip disabled and account not set ([#23584](https://github.com/frappe/erpnext/pull/23584)) +- Leave application status fix ([#23411](https://github.com/frappe/erpnext/pull/23411)) +- Not able to do overproduction ([#23600](https://github.com/frappe/erpnext/pull/23600)) +- Incorrect supplied qty error ([#23619](https://github.com/frappe/erpnext/pull/23619)) +- Download Required Materials not working for production plan ([#23403](https://github.com/frappe/erpnext/pull/23403)) +- Make account number length configurable ([#23496](https://github.com/frappe/erpnext/pull/23496)) +- Include item_code in items result to allow adding product info in custom templates ([#23440](https://github.com/frappe/erpnext/pull/23440)) +- Mode of payment getting overwritten by default mode of payment for returns ([#23599](https://github.com/frappe/erpnext/pull/23599)) +- Show total row in print format of financial statement ([#23565](https://github.com/frappe/erpnext/pull/23565)) +- Performance issue while adding template item in the cart ([#23508](https://github.com/frappe/erpnext/pull/23508)) +- Display item name instead of item code in offline POS ([#23451](https://github.com/frappe/erpnext/pull/23451)) +- Set stock UOM in item while creating material request from stock entry ([#23430](https://github.com/frappe/erpnext/pull/23430)) +- Book loss amount in the COGS instead of stock received but not billed ([#23412](https://github.com/frappe/erpnext/pull/23412)) +- Depreciation start date ux fixes ([#23340](https://github.com/frappe/erpnext/pull/23340)) +- Payment Schedule not fetching ([#23477](https://github.com/frappe/erpnext/pull/23477)) +- Taxable value in GSTR 3B report ([#23552](https://github.com/frappe/erpnext/pull/23552)) +- Negative stock error while submitting stock reco for batch item ([#23564](https://github.com/frappe/erpnext/pull/23564)) +- Check only Read and Write Permission in Update Items ([#23458](https://github.com/frappe/erpnext/pull/23458)) +- Handle Blank from/to range in Numeric Item Attribute ([#23484](https://github.com/frappe/erpnext/pull/23484)) +- Added new filters in the Batch-wise balance history report ([#23522](https://github.com/frappe/erpnext/pull/23522)) +- Added filter show in website for filtering product ([#23638](https://github.com/frappe/erpnext/pull/23638)) +- Enabled no copy property for Supplier Invoice Date to avoid due date validation ([#23367](https://github.com/frappe/erpnext/pull/23367)) +- Showing a negative balance in expired leaves ([#23426](https://github.com/frappe/erpnext/pull/23426)) +- Validate if removed item attributes exist in variants ([#23591](https://github.com/frappe/erpnext/pull/23591)) +- Longer timeout for company replace abbreviation ([#23442](https://github.com/frappe/erpnext/pull/23442)) +- Online pos print not working ([#23377](https://github.com/frappe/erpnext/pull/23377)) +- Last purchase rate in item prices report ([#23507](https://github.com/frappe/erpnext/pull/23507)) +- Do not consider opening entries for TDS calculation ([#23598](https://github.com/frappe/erpnext/pull/23598)) +- Project value is missing from procurement-tracker ([#23551](https://github.com/frappe/erpnext/pull/23551)) diff --git a/erpnext/change_log/v12/v12_14_0.md b/erpnext/change_log/v12/v12_14_0.md new file mode 100644 index 00000000000..14d601e182d --- /dev/null +++ b/erpnext/change_log/v12/v12_14_0.md @@ -0,0 +1,36 @@ +## ERPNext v12.14.0 Release Note + +### Fixes and Enhancements + +- Incorrect backflush qty in manufacture entry ([#23878](https://github.com/frappe/erpnext/pull/23878)) +- Fuel expense amount of vehicle log ([#23634](https://github.com/frappe/erpnext/pull/23634)) +- Extra material received against send to warehouse entry ([#23645](https://github.com/frappe/erpnext/pull/23645)) +- Show accounts in financial statements upto level 20 ([#23719](https://github.com/frappe/erpnext/pull/23719)) +- Remove Production Order reference from Item Validation ([#23733](https://github.com/frappe/erpnext/pull/23733)) +- Place of Supply fix in Sales Invoices ([#23786](https://github.com/frappe/erpnext/pull/23786)) +- Filter Leave Type based on allocation for a particular employee ([#22050](https://github.com/frappe/erpnext/pull/22050)) +- Incorrect assign to in Maintenance Schedule ([#23830](https://github.com/frappe/erpnext/pull/23830)) +- Manually set serial nos override with current available serial nos ([#23651](https://github.com/frappe/erpnext/pull/23651)) +- SO to PO flow improvement ([#23357](https://github.com/frappe/erpnext/pull/23357)) +- Payment Terms not fetched in Purchase Invoice from Purchase Receipt ([#23866](https://github.com/frappe/erpnext/pull/23866)) +- Re-linking bank accounts with plaid ([#23913](https://github.com/frappe/erpnext/pull/23913)) +- Incorrect outstanding amount for multicurrency with Reverse Charge ([#23863](https://github.com/frappe/erpnext/pull/23863)) +- Overproduction, not allowed to transfer extra materials ([#23647](https://github.com/frappe/erpnext/pull/23647)) +- Consider rounded_total in returns ([#23631](https://github.com/frappe/erpnext/pull/23631)) +- Default cost center in item master not set in stock entry ([#23816](https://github.com/frappe/erpnext/pull/23816)) +- Asset finance book posting date fix ([#23780](https://github.com/frappe/erpnext/pull/23780)) +- Added column cost_center to receivable reports ([#23837](https://github.com/frappe/erpnext/pull/23837)) +- Override field_map for job card gantt ([#23740](https://github.com/frappe/erpnext/pull/23740)) +- Added filter show in website for filtering product ([#23637](https://github.com/frappe/erpnext/pull/23637)) +- Serial no field is blank in stock reconciliation ([#23646](https://github.com/frappe/erpnext/pull/23646)) +- Copying po no when mapping doc ([#23730](https://github.com/frappe/erpnext/pull/23730)) +- Show form buttons only if permissions exist ([#23889](https://github.com/frappe/erpnext/pull/23889)) +- Cannot auto unlink payments for credit/debit notes ([#23690](https://github.com/frappe/erpnext/pull/23690)) +- None type error if the Pricing Rule applicable_for is None ([#23664](https://github.com/frappe/erpnext/pull/23664)) +- Don't copy terms, discount and required by from SO to PO ([#23904](https://github.com/frappe/erpnext/pull/23904)) +- Add Taxes if missing via Update Items ([#23705](https://github.com/frappe/erpnext/pull/23705)) +- Don't overrule Item Price via Pricing Rule Rate if 0 ([#23915](https://github.com/frappe/erpnext/pull/23915)) +- Show only available items in point of sale ([#23667](https://github.com/frappe/erpnext/pull/23667)) +- Auto State-wise gst tax template ([#23859](https://github.com/frappe/erpnext/pull/23859)) +- Stock ageing report not working ([#23924](https://github.com/frappe/erpnext/pull/23924)) +- Validate duplicate packing item in Product Bundle ([#23898](https://github.com/frappe/erpnext/pull/23898)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_15_0.md b/erpnext/change_log/v12/v12_15_0.md new file mode 100644 index 00000000000..54082c01ac8 --- /dev/null +++ b/erpnext/change_log/v12/v12_15_0.md @@ -0,0 +1,40 @@ +## ERPNext v12.15.0 Release Note + +### Fixes and Enhancements + +- BOM stock report color showing always red ([#23993](https://github.com/frappe/erpnext/pull/23993)) +- Clear error message when approval not availab ([#23972](https://github.com/frappe/erpnext/pull/23972)) +- Show tax amount in base currencies ([#24071](https://github.com/frappe/erpnext/pull/24071)) +- Depreciation Posting Date is mandatory even if Calculate Depreciation is not checked ([#24037](https://github.com/frappe/erpnext/pull/24037)) +- Handle Account and Item None not found in Opening Invoice Creation Tool ([#24103](https://github.com/frappe/erpnext/pull/24103)) +- Opening invoices in GSTR-1 report ([#24020](https://github.com/frappe/erpnext/pull/24020)) +- Incorrect balance value in stock balance report ([#23997](https://github.com/frappe/erpnext/pull/23997)) +- Columns mismatch in AR report([#24085](https://github.com/frappe/erpnext/pull/24085)) +- Job card error handling for operations field ([#23996](https://github.com/frappe/erpnext/pull/23996)) +- Set proper state code in ewaybill JSON when GST category is SEZ ([#23954](https://github.com/frappe/erpnext/pull/23954)) +- PO orverride ([#24023](https://github.com/frappe/erpnext/pull/24023)) +- Invoice generation for Unpaid subscriptions ([#23966](https://github.com/frappe/erpnext/pull/23966)) +- Throw an error when no pos profile exist ([#24026](https://github.com/frappe/erpnext/pull/24026)) +- Purchase receipt to purchase invoice bill date mapping ([#23968](https://github.com/frappe/erpnext/pull/23968)) +- Validation for duplicate Tax Category ([#24175](https://github.com/frappe/erpnext/pull/24175)) +- Double exception in payroll ([#24080](https://github.com/frappe/erpnext/pull/24080)) +- Sales invoice add button on sales order dashboard ([#24081](https://github.com/frappe/erpnext/pull/24081)) +- Hide Ex-Employees from Employee Tree and minor message UX ([#23927](https://github.com/frappe/erpnext/pull/23927)) +- Get value of allow_items_in_stock even if not an exact match ([#24099](https://github.com/frappe/erpnext/pull/24099)) +- Incorrect delink serial no and batch ([#23958](https://github.com/frappe/erpnext/pull/23958)) +- Pricing rule with transaction not working for additional product ([#24064](https://github.com/frappe/erpnext/pull/24064)) +- Check if list view standard filter exists in Payment Entry ([#23929](https://github.com/frappe/erpnext/pull/23929)) +- Do not fetch items until POS Profile is set ([#24076](https://github.com/frappe/erpnext/pull/24076)) +- Taxation fixes for India ([#24162](https://github.com/frappe/erpnext/pull/24162)) +- Don't cancel job card if manufacturing entry has made ([#24034](https://github.com/frappe/erpnext/pull/24034)) +- Payment Reconciliation client side validations ([#23930](https://github.com/frappe/erpnext/pull/23930)) +- Item Link Formatter Behaviour ([#23931](https://github.com/frappe/erpnext/pull/23931)) +- Asset with value zero doesn't show up in fixed asset register ([#24098](https://github.com/frappe/erpnext/pull/24098)) +- Allow add to cart for any item if allow_items_not_in_stock is enabled ([#24084](https://github.com/frappe/erpnext/pull/24084)) +- Incoming rate for finished good ([#24013](https://github.com/frappe/erpnext/pull/24013)) +- Incorrect stock ledger entries for stock reco ([#23938](https://github.com/frappe/erpnext/pull/23938)) +- Function imports in account_balance_timeline.py ([#24097](https://github.com/frappe/erpnext/pull/24097)) +- Sequence Matcher error in Bank Reconciliation ([#23539](https://github.com/frappe/erpnext/pull/23539)) +- Shipping charges not sync from shopify ([#24009](https://github.com/frappe/erpnext/pull/24009)) +- Delete Receive at Warehouse entry on cancellation of Send to War… ([#24068](https://github.com/frappe/erpnext/pull/24068)) +- Get formatted value in 'taxes' print template ([#24036](https://github.com/frappe/erpnext/pull/24036)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_16_0.md b/erpnext/change_log/v12/v12_16_0.md new file mode 100644 index 00000000000..62ec8d340e3 --- /dev/null +++ b/erpnext/change_log/v12/v12_16_0.md @@ -0,0 +1,11 @@ +## ERPNext v12.16.0 Release Note + +### Feature + +- GST E-invoicing for India ([#24184](https://github.com/frappe/erpnext/pull/24184)) + +### Fixes + +- Do not override the manually added valuation rate in stock entry ([#24221](https://github.com/frappe/erpnext/pull/24221)) + +- Do not manufacture same serial no multiple times ([#24163](https://github.com/frappe/erpnext/pull/24163)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_17_0.md b/erpnext/change_log/v12/v12_17_0.md new file mode 100644 index 00000000000..72c31ce9a62 --- /dev/null +++ b/erpnext/change_log/v12/v12_17_0.md @@ -0,0 +1,24 @@ +## ERPNext v12.17.0 Release Notes + +### Features + +- Separated equity tree in COA SKR04 ([#24094](https://github.com/frappe/erpnext/pull/24094)) +- Display transporter address in sales invoice ([#23731](https://github.com/frappe/erpnext/pull/23731)) +- Introduced GST E-Invoicing ([#24184](https://github.com/frappe/erpnext/pull/24184)) + +### Fixes + +- Fixed Payment Entry multi-currency issue ([#24331](https://github.com/frappe/erpnext/pull/24331)) +- Fixed an issue where user could have manufactured same serial no multiple times ([#24163](https://github.com/frappe/erpnext/pull/24163)) +- Back Update from QC based on Batch No ([#24368](https://github.com/frappe/erpnext/pull/24368)) +- Fixed tax calculation on salary slip for the first month ([#24309](https://github.com/frappe/erpnext/pull/24309)) ([#24272](https://github.com/frappe/erpnext/pull/24272)) +- Fixed issues related to e-invoicing ([#24366](https://github.com/frappe/erpnext/pull/24366)) ([#24421](https://github.com/frappe/erpnext/pull/24421)) ([#24284](https://github.com/frappe/erpnext/pull/24284)) +- Added a validation to restrict manual overriding of valuation rate in Stock Entry ([#24221](https://github.com/frappe/erpnext/pull/24221)) +- Fixed incorrect serial no. in the subcontracted Purchase Receipt ([#24353](https://github.com/frappe/erpnext/pull/24353)) +- Fixed an issue where Stock Ledger entry was not getting created against Stock Reconciliation ([#24384](https://github.com/frappe/erpnext/pull/24384)) +- Fixed company wise Valuation Rate for raw material in BOM ([#24367](https://github.com/frappe/erpnext/pull/24367)) +- Fixed Taxation related issue ([#24159](https://github.com/frappe/erpnext/pull/24159)) +- Allowed to override the basic rate for the finished good ([#24301](https://github.com/frappe/erpnext/pull/24301)) +- Fixed Loyalty Program related issues ([#24188](https://github.com/frappe/erpnext/pull/24188)) +- Fixed an issue where last purchase rate was not getting updated on canceling last voucher ([#24323](https://github.com/frappe/erpnext/pull/24323)) +- Fixed issue with pricing rule for offline POS ([#24288](https://github.com/frappe/erpnext/pull/24288)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_18_0.md b/erpnext/change_log/v12/v12_18_0.md new file mode 100644 index 00000000000..64e5d0761e2 --- /dev/null +++ b/erpnext/change_log/v12/v12_18_0.md @@ -0,0 +1,37 @@ +## ERPNext v12.18.0 Release Notes + +### Enhancements + +- Make patient age translatable ([#24416](https://github.com/frappe/erpnext/pull/24416)) +- Adding UOM, Item Group via Update Items ([#24479](https://github.com/frappe/erpnext/pull/24479)) + +### Fixes + +- Incorrect incoming rate for the sales return ([#24620](https://github.com/frappe/erpnext/pull/24620)) +- Prorata factor fixes in subscription ([#24638](https://github.com/frappe/erpnext/pull/24638)) +- QR code image generation for e-invoicing ([#24422](https://github.com/frappe/erpnext/pull/24422)) +- Validation for disabled warehouse ([#24546](https://github.com/frappe/erpnext/pull/24546)) +- Update total in words after updating items ([#24592](https://github.com/frappe/erpnext/pull/24592)) +- Set contact email in RFQ ([#24486](https://github.com/frappe/erpnext/pull/24486)) +- Plaid client version to support latest API ([#24532](https://github.com/frappe/erpnext/pull/24532)) +- Dynamic Links for reports ([#24461](https://github.com/frappe/erpnext/pull/24461)) +- Use supplied year for IRS 1099 forms ([#24425](https://github.com/frappe/erpnext/pull/24425)) +- Add check for allowing access to european region ([#24393](https://github.com/frappe/erpnext/pull/24393)) +- Item-wise Sales Register item_name error ([#24484](https://github.com/frappe/erpnext/pull/24484)) +- Skip e-invoice generation for non-taxable invoices (India) ([#24569](https://github.com/frappe/erpnext/pull/24569)) +- Issues with packing items ([#24606](https://github.com/frappe/erpnext/pull/24606)) +- Remove max 5 file attachment limit in task ([#24056](https://github.com/frappe/erpnext/pull/24056)) +- Calculate discount amount ([#24511](https://github.com/frappe/erpnext/pull/24511)) +- Validate tax template for tax category ([#24403](https://github.com/frappe/erpnext/pull/24403)) +- Do not validate gstin for exports (India) ([#24564](https://github.com/frappe/erpnext/pull/24564)) +- Stock ageing should not take cancelled stock entries. ([#24438](https://github.com/frappe/erpnext/pull/24438)) +- Discount amount calculation on net total ([#24498](https://github.com/frappe/erpnext/pull/24498)) +- Fetching of standalone cr/dr notes for reconciliation ([#24576](https://github.com/frappe/erpnext/pull/24576)) +- Avoid changing Ref. Doctype in Accounting Dimension after creation ([#24579](https://github.com/frappe/erpnext/pull/24579)) +- Add GST state code for Ladakh (India) ([#24635](https://github.com/frappe/erpnext/pull/24635)) +- Consolidated Financial Statement report not works if child company accounts not present in the parent company ([#24580](https://github.com/frappe/erpnext/pull/24580)) +- Missing Asset Id in the Fixed Asset Register Report ([#24391](https://github.com/frappe/erpnext/pull/24391)) +- e_invoice print format not showing other charges ([#24473](https://github.com/frappe/erpnext/pull/24473)) +- Fix filters for report IRS 1099 ([#24597](https://github.com/frappe/erpnext/pull/24597)) +- Stock ledger entry was not created against stock reconciliation ([#24382](https://github.com/frappe/erpnext/pull/24382)) +- Validate cancellation only if irn generated (India) ([#24609](https://github.com/frappe/erpnext/pull/24609)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_20_0.md b/erpnext/change_log/v12/v12_20_0.md new file mode 100644 index 00000000000..b7c16c236ca --- /dev/null +++ b/erpnext/change_log/v12/v12_20_0.md @@ -0,0 +1,34 @@ +## Version 12.20.0 Release Notes + + +### Fixes & Enhancements + +- E-invoicing - Validations & tax calculation fixes ([#25315](https://github.com/frappe/erpnext/pull/25315)) +- Allow zero valuation in stock reconciliation ([#24986](https://github.com/frappe/erpnext/pull/24986)) +- Remove shipping address GSTIN validation for e-invoice ([#25133](https://github.com/frappe/erpnext/pull/25133)) +- Allow Item image alt ([#24935](https://github.com/frappe/erpnext/pull/24935)) +- Added parent task expected end date validation ([#24889](https://github.com/frappe/erpnext/pull/24889)) +- Incorrect Nil Exempt and Non GST amount in GSTR3B report ([#24919](https://github.com/frappe/erpnext/pull/24919)) +- Item attributes not editable until refresh ([#24887](https://github.com/frappe/erpnext/pull/24887)) +- Create property setters for shorter naming series ([#25134](https://github.com/frappe/erpnext/pull/25134)) +- Serial no refresh issue ([#25130](https://github.com/frappe/erpnext/pull/25130)) +- Sales Order not saving due type mismatch in promo scheme (#24748) ([#25056](https://github.com/frappe/erpnext/pull/25056)) +- TDS check getting checked after reload ([#24974](https://github.com/frappe/erpnext/pull/24974)) +- Round total quantity in job card ([#25246](https://github.com/frappe/erpnext/pull/25246)) +- santize_for_json is not defined ([#25157](https://github.com/frappe/erpnext/pull/25157)) +- Apply single transaction threshold on net_total instead of supplier credit amount ([#25208](https://github.com/frappe/erpnext/pull/25208)) +- Zero amount completed delivery notes being shown in Sales Invoice get items ([#25318](https://github.com/frappe/erpnext/pull/25318)) +- Error message compensatory leave request ([#25216](https://github.com/frappe/erpnext/pull/25216)) +- RCM tax calculation ([#25226](https://github.com/frappe/erpnext/pull/25226)) +- Don't delete mode of payment account details while deleting comp… ([#25218](https://github.com/frappe/erpnext/pull/25218)) +- Opportunity-quotation mapping order status ([#25002](https://github.com/frappe/erpnext/pull/25002)) +- Object referencing same memory address issue ([#25165](https://github.com/frappe/erpnext/pull/25165)) +- Validation msg for TransDocNo e-invoicing ([#25120](https://github.com/frappe/erpnext/pull/25120)) +- Do not fetch stopped MR in production plan ([#25110](https://github.com/frappe/erpnext/pull/25110)) +- Incorrect status creating PR from PO after creating PI ([#25203](https://github.com/frappe/erpnext/pull/25203)) +- Remove gst name validation for purchase Invoice ([#25236](https://github.com/frappe/erpnext/pull/25236)) +- Assignment Rule Unassign Condition doesn't work ([#24890](https://github.com/frappe/erpnext/pull/24890)) +- Place of supply for e-invoicing ([#25149](https://github.com/frappe/erpnext/pull/25149)) +- Serial no trim issue ([#24950](https://github.com/frappe/erpnext/pull/24950)) +- Commit individual SLE rename for large datasets (v12) ([#25085](https://github.com/frappe/erpnext/pull/25085)) +- Incorrect batch picked in subcontracted purchase receipt ([#25169](https://github.com/frappe/erpnext/pull/25169)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_21_0.md b/erpnext/change_log/v12/v12_21_0.md new file mode 100644 index 00000000000..946bf09d9e4 --- /dev/null +++ b/erpnext/change_log/v12/v12_21_0.md @@ -0,0 +1,21 @@ +## Version 12.21.0 Release Notes + + +### Fixes & Enhancements + +- Incorrect qty calculated for sub-contracted raw materials in purchase receipt ([#25443](https://github.com/frappe/erpnext/pull/25443)) +- Update cost center in the item table fetched from POS Profile in v12 ([#25612](https://github.com/frappe/erpnext/pull/25612)) +- Total stock summary report not working ([#25552](https://github.com/frappe/erpnext/pull/25552)) +- Timeout error while loading warehouse tree ([#25693](https://github.com/frappe/erpnext/pull/25693)) +- RCM rounding precision ([#25410](https://github.com/frappe/erpnext/pull/25410)) +- Change subcontracted item display ([#25426](https://github.com/frappe/erpnext/pull/25426)) +- Remove invalid changes added due to merge conflict ([#25437](https://github.com/frappe/erpnext/pull/25437)) +- Add document type field for e-invoicing (Italy) ([#25420](https://github.com/frappe/erpnext/pull/25420)) +- Issue in project custom status ([#25453](https://github.com/frappe/erpnext/pull/25453)) +- Employee Separation ([#25504](https://github.com/frappe/erpnext/pull/25504)) +- State code for Other Territory ([#25422](https://github.com/frappe/erpnext/pull/25422)) +- Remove invalid changes added due to merge conflict ([#25405](https://github.com/frappe/erpnext/pull/25405)) +- Check for None in item.schedule_date before setting ([#25589](https://github.com/frappe/erpnext/pull/25589)) +- Can't multiply sequence by non-int of type 'float' ([#25385](https://github.com/frappe/erpnext/pull/25385)) +- Filter using purpose, make requested changes ([#25388](https://github.com/frappe/erpnext/pull/25388)) +- Purchase from registered composition dealer ([#25419](https://github.com/frappe/erpnext/pull/25419)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_22_0.md b/erpnext/change_log/v12/v12_22_0.md new file mode 100644 index 00000000000..4dc49412a4c --- /dev/null +++ b/erpnext/change_log/v12/v12_22_0.md @@ -0,0 +1,16 @@ +## Version 12.22.0 Release Notes + +### Fixes & Enhancements + +- Cost-center wise period closing entry ([#25930](https://github.com/frappe/erpnext/pull/25930)) +- Wrong round off gl entry posted in case of purchase invoice ([#25952](https://github.com/frappe/erpnext/pull/25952)) +- Sync shopify customer addresses (#25481) ([#25937](https://github.com/frappe/erpnext/pull/25937)) +- Plaid NoneType error ([#25662](https://github.com/frappe/erpnext/pull/25662)) +- Cashlfow mapper not showing data ([#25739](https://github.com/frappe/erpnext/pull/25739)) +- Update shopify api version (#25600) ([#25939](https://github.com/frappe/erpnext/pull/25939)) +- Invalid 'depends_on' expression in opportunity ([#25954](https://github.com/frappe/erpnext/pull/25954)) +- Ignore rounding diff while importing JV using data import ([#25715](https://github.com/frappe/erpnext/pull/25715)) +- update cost center from POS ([#25972](https://github.com/frappe/erpnext/pull/25972)) +- update employee field on renaming employee ([#25958](https://github.com/frappe/erpnext/pull/25958)) +- student invalid password reset link ([#25827](https://github.com/frappe/erpnext/pull/25827)) +- Backward compatibility for GSTR-1 report ([#25913](https://github.com/frappe/erpnext/pull/25913)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_23_0.md b/erpnext/change_log/v12/v12_23_0.md new file mode 100644 index 00000000000..3b4ca5ce568 --- /dev/null +++ b/erpnext/change_log/v12/v12_23_0.md @@ -0,0 +1,20 @@ +## Version 12.23.0 Release Notes + +### Fixes & Enhancements +- Added Permissions for employee to book an appointment ([#26246](https://github.com/frappe/erpnext/pull/26246)) +- New check field in subscriptions for (not) submitting invoices (BP #25394) ([#25560](https://github.com/frappe/erpnext/pull/25560)) +- fix(e-invoicing): allow export invoice even if no taxes applied (#26363) ([#26406](https://github.com/frappe/erpnext/pull/26406)) +- Omit item discount amount for e-invoicing (#26353) ([#26408](https://github.com/frappe/erpnext/pull/26408)) +- fix(plaid): cannot reset plaid link for a bank account ([#26282](https://github.com/frappe/erpnext/pull/26282)) +- Job applicant link issue ([#25935](https://github.com/frappe/erpnext/pull/25935)) +- LMS progress issue ([#26254](https://github.com/frappe/erpnext/pull/26254)) +- Half day to be accounted in its leave type ([#26267](https://github.com/frappe/erpnext/pull/26267)) +- Material request status issue ([#26089](https://github.com/frappe/erpnext/pull/26089)) +- fix(e-invoicing): service item check ([#26141](https://github.com/frappe/erpnext/pull/26141)) +- Invoices can alter profit and loss of a closed year ([#26161](https://github.com/frappe/erpnext/pull/26161)) +- Material request and supplier quotation not linked if supplier quotation created from supplier portal ([#26117](https://github.com/frappe/erpnext/pull/26117)) +- Update positions in default cashflow mappers ([#26091](https://github.com/frappe/erpnext/pull/26091)) +- Staffing plan vacancies data type issue ([#25940](https://github.com/frappe/erpnext/pull/25940)) +- Added company filter while fetching loans ([#26296](https://github.com/frappe/erpnext/pull/26296)) +- Serial no issue in subcontract purchase receipt ([#26423](https://github.com/frappe/erpnext/pull/26423)) +- Fixed rounding off ordered percent to 100 in condition ([#26153](https://github.com/frappe/erpnext/pull/26153)) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_3_0.md b/erpnext/change_log/v12/v12_3_0.md new file mode 100644 index 00000000000..6ac71df564f --- /dev/null +++ b/erpnext/change_log/v12/v12_3_0.md @@ -0,0 +1,33 @@ +# Version 12.3.0 Release Notes + +### Accounting + +1. Statewise GST taxation for India + - Added GST state in the tax category + - Added tax category in the address, sales/purchase tax template + - Based on the address system will fetch the tax template +2. Accounts Payable report based on payment terms +3. Trial Balance Report with filter "Party Name" +4. Fixed asset register report with date filters + +### CRM + +1. Appointment Scheduling + - Configure the appointment slots using Appointment Booking Settings + - Users can book the appointment through the portal based on slot availability + +### HR + +1. Refactored Employee Attendance Tool +2. Set allocated amount in employee advance as per total amount + +### Fixes + +1. Stock entry decimal issue while creating the GL entries +2. Item wise stock balance report +3. Valuation of subcontracting finished good item +4. Not able to create Instructor, Student entries +5. Pricing rule for a product discount +6. POS for serialized items +7. Not able to cancel share transfer entry +8. Ledger entries for compensatory off were not getting created diff --git a/erpnext/change_log/v12/v12_4_0.md b/erpnext/change_log/v12/v12_4_0.md new file mode 100644 index 00000000000..3c8297368e2 --- /dev/null +++ b/erpnext/change_log/v12/v12_4_0.md @@ -0,0 +1,89 @@ +# Version 12.4.0 Release Note + +### Accounts + +- Validity of item tax. [#20135](https://github.com/frappe/erpnext/pull/20135) + +- Dynamic filters for dimensions in the budget variance report. [#19973](https://github.com/frappe/erpnext/pull/19973) + +- Purchase Receipt and Purchase Invoice is not mandatory for an existing asset. [19980](https://github.com/frappe/erpnext/pull/19980) + +- Allowed multiple Landed Cost Vouchers against a Purchase Receipt / Purchase Invoice. [#20058](https://github.com/frappe/erpnext/pull/20058) + +- Rounding adjustment while both inclusive tax and additional discount amount are applied. [#20078](https://github.com/frappe/erpnext/pull/20078) + +- Fixed an error while doing payment reconciliation for party type Employee. [#20088](https://github.com/frappe/erpnext/pull/20088) + +- Show Closing row in General Ledger print. [#20161](https://github.com/frappe/erpnext/pull/20161) + +- New report - Stock and Account Balance Comparison. [#20226](https://github.com/frappe/erpnext/pull/20226) + +- Paid amount should not be over-written on clicking "Get Outstanding Invoices" button in Payment Entry. [#20050](https://github.com/frappe/erpnext/pull/20050) + +- Currency symbol in Sales / Purchase Register report + +- Currency symbol in "Bank and Cash Payment Voucher" print format. + + +### Human Resource + +- Fixed leave allocation on the compensatory leave request submission. [#19961](https://github.com/frappe/erpnext/pull/19961) + +- Create Payment Entry against Employee Advance to return any unclaimed amount and update returned amount in Employee Advance. [#19955](https://github.com/frappe/erpnext/pull/19955) + +- Set Party against loan accounts in an accrual journal entry for salary. [#20022](https://github.com/frappe/erpnext/pull/20022) + +- Editable loan repayment schedule after submission [#20122](https://github.com/frappe/erpnext/pull/20112) + +- Update the paid amount and status of a loan after processing salary slip against it. [#20023](https://github.com/frappe/erpnext/pull/20023) + +- Settings to disable rounded total in salary slip via HR Settings. [#20150](https://github.com/frappe/erpnext/pull/20150) + +- Submit Salary button was not showing after creating salary slip in payroll entry. [#19753](https://github.com/frappe/erpnext/pull/19753) + +- Payment Entry against payroll entry should deduct loan amount (if there are any loan deductions in salary slip). [#20194](https://github.com/frappe/erpnext/pull/20194) + +- Show only relevant "Job Offer" in Employee Onboarding based on Job Applicant + +- Added dashboard in Employee Advance + + +### Manufacturing + +- Fixed backflushed qty for partial receipt against a subcontracted purchase order. [#20026](https://github.com/frappe/erpnext/pull/20026) + +- Added "Set Reserve Warehouse" field in sub-contracted Purchase Order. [19992](https://github.com/frappe/erpnext/pull/19992) + - Only shows if the supplied items table is not empty + - On entering a warehouse in the field, it sets / overwrites reserve warehouse in Supplied Raw Materials table. + +- In Backflush Stock Entry against Work Order, additional cost for service items (defined in BOM) should come proportionately based on finished goods qty. [#20105](https://github.com/frappe/erpnext/pull/20105) + +- Hide transfer button in a subcontracted PO if full qty is already transferred. [#20155](https://github.com/frappe/erpnext/pull/20155) + +- Set correct valuation rate of finished goods item in case of multiple material consumptions. [#20165](https://github.com/frappe/erpnext/pull/20165) + +- Job Card creation from Work Order dashboard + + +### Stock + +- Fixed ambiguous column name in the Batch query. Test by searching in any Batch link field. + +- Fixed incorrect reorder level in Stock balance report + +- Validate Batch for serialized items + +- Get the outgoing rate of serial no from SLE if serial no already transferred to another company. [#20171](https://github.com/frappe/erpnext/pull/20171) + +- Deliver Note creation from Sales Order dashboard. [#20199](https://github.com/frappe/erpnext/pull/20199) + + +### Others + +- Addition and deletion of items in submitted Sales Order / Purchase Order. [#19911](https://github.com/frappe/erpnext/pull/19911) + +- Get item price based on price list considering minimum qty. [#20206](https://github.com/frappe/erpnext/pull/20206) + +- Product Bundle item should not appear in dialog on click of "Create Material Request" button. [#20216](https://github.com/frappe/erpnext/pull/20216) + +- Delete linked communications on the deletion of company transactions. [#19928](https://github.com/frappe/erpnext/pull/19928) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_5_0.md b/erpnext/change_log/v12/v12_5_0.md new file mode 100644 index 00000000000..77499e61baf --- /dev/null +++ b/erpnext/change_log/v12/v12_5_0.md @@ -0,0 +1,53 @@ +## Version 12.5.0 Release Note + +### New Features: +- **Group by Customer / Customer Group / Item / Item Group / Territory / Invoice** option in Itemised Sales Register report [#20251](https://github.com/frappe/erpnext/pull/20251) + +- **Group by Supplier / Item / Item Group / Invoice** option in Itemised Purchase Register report + +- **Group by Customer / Supplier** option in Accounts Receivable / Payable report + +- Enhanced Fixed Asset Register report [#20332](https://github.com/frappe/erpnext/pull/20332) + +- Added tax category in pos profile [#20413](https://github.com/frappe/erpnext/pull/20413) + + +### Fixes +- GL Entries were not creating on manual asset creation [#20265](https://github.com/frappe/erpnext/pull/20265) + +- Payment Entry should not be allowed against blocked Purchase Invoice until release date [#20270](https://github.com/frappe/erpnext/pull/20270) + +- Incorrect number of GL Entries error in stock entry due to precision issue [#20297](https://github.com/frappe/erpnext/pull/20297) + +- Wrong outstanding invoices fetched against employee [#20373](https://github.com/frappe/erpnext/pull/20373) + +- Finance book filtering logic in financial statements and other accounting reports [#20411](https://github.com/frappe/erpnext/pull/20410) + +- Additional discount was not appling on sales invoice created by subscription [#20432](https://github.com/frappe/erpnext/pull/20432) + +- Deprecated fetching item price based on minimum qty [#20346](https://github.com/frappe/erpnext/pull/20346) + +- Calculation of carry forwarded leaves [#20341](https://github.com/frappe/erpnext/pull/20341) + +- Quotation status will be expired based on validity only if it is not Ordered or Lost [#20365](https://github.com/frappe/erpnext/pull/20354) + +- Delete auto created batch on cancellation of Purchase Receipt / Stock Entry [#20392](https://github.com/frappe/erpnext/pull/20392) + +- Show product bundle item's availability on website based on availability of all bundled items [#20384](https://github.com/frappe/erpnext/pull/20384) + +- Show relevant suppliers on "Create Purchase Order" popup in Material Request [#20232](https://github.com/frappe/erpnext/pull/20232) + +- Cannot complete task if dependent task are not completed / cancelled [#20434](https://github.com/frappe/erpnext/pull/20434) + +- Show numeric values in item configurator [#20430](https://github.com/frappe/erpnext/pull/20430) + +- Filter serial no based on batch no [#20566](https://github.com/frappe/erpnext/pull/20566) + +- Pricing rule was not working on item groups [#20546](https://github.com/frappe/erpnext/pull/20546) + +- Disabled quick entry for doctypes with tree view [#20453](https://github.com/frappe/erpnext/pull/20453) + +### Optimisation +- Handling of large number of serial no creation via Purchase Receipt / Stock Entry (10 times faster than before!) [#20540](https://github.com/frappe/erpnext/pull/20540) + +- Update outstanding amount on Sales Invoice on submission of invoice / payment [#20557](https://github.com/frappe/erpnext/pull/20557) diff --git a/erpnext/change_log/v12/v12_6_0.md b/erpnext/change_log/v12/v12_6_0.md new file mode 100644 index 00000000000..b84e9bf0dc1 --- /dev/null +++ b/erpnext/change_log/v12/v12_6_0.md @@ -0,0 +1,53 @@ +## Version 12.6.0 Release Note + +### Enhancements + +- Deduction based on earnings/gross pay [#20935](https://github.com/frappe/erpnext/pull/20935) + +- If accounting dimension is tree-structured document and in report, filter is set based on group node, get result based on all children [#20860](https://github.com/frappe/erpnext/pull/20860) + +- Item alternative must have similar properties as original item [#20796](https://github.com/frappe/erpnext/pull/20796) + +- Show multiple manufacturers and part numbers in BOM Sock Calculated report [#19431](https://github.com/frappe/erpnext/pull/19431) + + +### Optimizations + +- Payment Reconciliation: search for customer's return invoices then filter out gl entries [#20710](https://github.com/frappe/erpnext/pull/20710) + +- Optimization of GL entry posting [#20676](https://github.com/frappe/erpnext/pull/20676) + +- Processing of serial numbers in Material Transfer [#20722](https://github.com/frappe/erpnext/pull/20722) + + +### Fixes: + +- Rate and amount in material request should not be copying from sales order [#20718](https://github.com/frappe/erpnext/pull/20718) + +- Update items after submission only if rate or qty changed [#20743](https://github.com/frappe/erpnext/pull/20743) + +- Odometer value was not syncing properly [#20451](https://github.com/frappe/erpnext/pull/20451) + +- Earn leave were not getting created when the max leaves allowed were set to 0 or less [#20535](https://github.com/frappe/erpnext/pull/20535) + +- Additional salary should not be created for inactive employee [#20686](https://github.com/frappe/erpnext/pull/20686) + +- Account dashboard was not working [#20715](https://github.com/frappe/erpnext/pull/20715) + +- Ignore mandatory fields while creating Material Request based on reorder level [#20720](https://github.com/frappe/erpnext/pull/20720) + +- Ignore permission when deleting linked emails in process of deletion of all company transactions [#20753](https://github.com/frappe/erpnext/pull/20753) + +- Total amount was not displaying in Journal Entry [#20794](https://github.com/frappe/erpnext/pull/20794) + +- HSN Code was not visible in GST itemised sales register [#20821](https://github.com/frappe/erpnext/pull/20821) + +- Validate Serial No/Batch No against unserialized item in Stock Reconciliation [#20858](https://github.com/frappe/erpnext/pull/20858) + +- Customer group filter resets on syncing invoices in offline POS [#20873](https://github.com/frappe/erpnext/pull/20873) + +- Purchase return were allowed even when assets are not cancelled [#20798](https://github.com/frappe/erpnext/pull/20798) + +- Reserved qty for production calculation if material transfer is skipped [#20900](https://github.com/frappe/erpnext/pull/20900) + +- Lock stock ledger entries that are being reposted to control concurrency [#20739](https://github.com/frappe/erpnext/pull/20739) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_7_0.md b/erpnext/change_log/v12/v12_7_0.md new file mode 100644 index 00000000000..401bc1d135b --- /dev/null +++ b/erpnext/change_log/v12/v12_7_0.md @@ -0,0 +1,63 @@ +## ERPNext v12.7.0 Release Note + +### Enhancements + +- Allow Purchase/Sales Invoice without Purchase/Sales Order against a specific Supplier/Customer [#20865](https://github.com/frappe/erpnext/pull/20865) +- The address is now mandatory to place an order from Shopping Cart [#20922](https://github.com/frappe/erpnext/pull/20922) +- Target Warehouse for finished goods in Manufacture type Stock Entry now can be different from Work Order [#21002](https://github.com/frappe/erpnext/pull/21002) +- Qty in Stock Entry must always be positive [#21004](https://github.com/frappe/erpnext/pull/21004) +- Enhanced UX for Manufacturing module [#19802](https://github.com/frappe/erpnext/pull/19802) + - Default calendar for Job Card + - Changed Timer Position, Added Pause, Resume Button + - Progress Bar for Work Order Operations + - Create Multiple Job Cards from Work Order + - Removed Projected Quantity Formula Section from Production Plan and Added Doc Link Next to Field + - Grouped relevant fields +- Allowed customized Order Type in Sales Order [#18096](https://github.com/frappe/erpnext/pull/18096) +- Added Serial No Status field for the filter in List and Report view [#21201](https://github.com/frappe/erpnext/pull/21201) +- Enabled new regions (UAE, BR, MX) to amazon MWS connector [#21195](https://github.com/frappe/erpnext/pull/21195) +- Added Scan Barcode field in Purchase Receipt [#21181](https://github.com/frappe/erpnext/pull/21181) +- Added Cost Center, Warehouse and Item Group filters in Purchase Register report [#21177](https://github.com/frappe/erpnext/pull/21177) +- Show filtered items in Material Request based on Request Type [#21173](https://github.com/frappe/erpnext/pull/21173) +- Set Qty To Manufacture field as non-mandatory in job card [#21080](https://github.com/frappe/erpnext/pull/21080) +- Fetch batch no automatically from serial no, if the item has both serial and batch no [#20757](https://github.com/frappe/erpnext/pull/20757) + +### Fixes: +- The payment status of Expense Claim considering Employee Advance amount +- Fixes in BOM Comparison Tool [#20992](https://github.com/frappe/erpnext/pull/20992) +- UOM fixes in Sales Order, Material Request and Production Plan [#21015](https://github.com/frappe/erpnext/pull/21015) +- Passive Italian e-Invoicing [#19334](https://github.com/frappe/erpnext/issues/19334) +- Batch selection popup not coming for stock entry [#21036](https://github.com/frappe/erpnext/pull/21036) +- Place of supply validation in GSTR-1 report (for India) [#21057](https://github.com/frappe/erpnext/pull/21057) +- On changing qty, the free item was not removing [#21250](https://github.com/frappe/erpnext/pull/21250) +- If Lead name has leading white space, Contact's first name was set to blank [#21247](https://github.com/frappe/erpnext/pull/21247) +- Make Message field mandatory in Project, if Collect Progress is checked [#21208](https://github.com/frappe/erpnext/pull/21208) +- Show base received amount only when base paid amount defers from base received amount [#21193](https://github.com/frappe/erpnext/pull/21193) +- Consider reverted entries to cancel out expired leave entries which were reverted [#21256](https://github.com/frappe/erpnext/pull/21256) +- The tax amount after discount amount should be considered for tax calculation in GSTR-3B report [#21241](https://github.com/frappe/erpnext/pull/21241) +- Replace newlines with spaces before evaluation of condition and formula [#21166](https://github.com/frappe/erpnext/pull/21166) +- Get serial nos qty in Stock Reconciliation based on posting date and time [#21169](https://github.com/frappe/erpnext/pull/21169) +- Validate Serial/Batch No naming series in Item itself [#21167](https://github.com/frappe/erpnext/pull/21167) +- When shipping tax is set it does not clear cart and gives error [#21035](https://github.com/frappe/erpnext/pull/21035) +- While creating Sales Invoice from the shopping cart, enable auto allocation of advances [#20878](https://github.com/frappe/erpnext/pull/20878) +- Payment Request status fixes [#21100](https://github.com/frappe/erpnext/pull/21100) +- Add permissions on GSTR-3B report only for India [#21163](https://github.com/frappe/erpnext/pull/21163) +- Since a Customer Provided Item does not have a valuation rate, expenses should not be booked in Stock Entry [#21156](https://github.com/frappe/erpnext/pull/21156) +- Update Received Qty in Material Request as per Stock UOM [#21055](https://github.com/frappe/erpnext/pull/21054) +- Cannot set warehouse while deleting all items from submitted sales order and then adding new items [#21078](https://github.com/frappe/erpnext/pull/21078) +- Serial no scan was not adding the serial nos in stock entry [#21082](https://github.com/frappe/erpnext/pull/21082) +- Healthcare Domain Issues [#21112](https://github.com/frappe/erpnext/pull/21112) + - Appointment Reminders not working + - Disabled Patient, Practitioner Schedule, Clinical Procedure Template showed as enabled in ListView. + - Batch not getting fetched in Clinical Procedure Item. + - Lab Test Template Item creation error + - Lab Test Template error while creating a Patient Medical Record +- Party details not set in Payment Request in case of payment failed from shopping cart [#21085](https://github.com/frappe/erpnext/pull/21085) +- Allowed Expense accounts with only base currency in Landed Cost voucher [#21074](https://github.com/frappe/erpnext/pull/21074) +- Price list mentioned in Customer Group should get priority over POS Profile [#21117](https://github.com/frappe/erpnext/pull/21117) +- Show proper currency symbol in Total row in Accounts Receivable/Payable report [#21090](https://github.com/frappe/erpnext/pull/21090) +- Add item defaults based on global settings only if default company and warehouse is mentioned [#21088](https://github.com/frappe/erpnext/pull/21088) +- If "Display Items In Stock" enabled, show only available items in POS [#21071](https://github.com/frappe/erpnext/pull/21071) +- Update Requested Qty in Bin based on Material Request Type [#21065](https://github.com/frappe/erpnext/pull/21065) +- Ignored user permission for parent_company and existing_company field in Company [#21010](https://github.com/frappe/erpnext/pull/21010) +- Wrong calculation of depreciation eliminated in Asset Depreciation and Balances report [#21032](https://github.com/frappe/erpnext/pull/21032) \ No newline at end of file diff --git a/erpnext/change_log/v12/v12_8_0.md b/erpnext/change_log/v12/v12_8_0.md new file mode 100644 index 00000000000..87f46fe2c84 --- /dev/null +++ b/erpnext/change_log/v12/v12_8_0.md @@ -0,0 +1,11 @@ +## ERPNext v12.8.0 Release Note + +#### Income Tax Slab +Introduced a brand new **[Income Tax Slab](https://docs.erpnext.com/docs/user/manual/en/human-resources/income-tax-slab)** document to define individial's income tax rates based on different taxable income slab directed by the Government. +Using this document, Indian users will now be able to define income tax slabs for both old (2019) and new tax regime (2020). + +#### Salary Component Exempted from Income Tax +A new checkbox has been introduced in Salary Component. If checked, the full amount will be deducted from taxable income before calculating income tax without any declaration or proof submission. For example, Professional Tax in India is deducted from taxable income without any document proof. + +#### Employee Other Income +Employee Other Income is now a new document to declare other income of an employee from other sources. Previously, it was part of the Employee Tax Exemption Declaration document. diff --git a/erpnext/change_log/v12/v12_9_0.md b/erpnext/change_log/v12/v12_9_0.md new file mode 100644 index 00000000000..5d7e0587a34 --- /dev/null +++ b/erpnext/change_log/v12/v12_9_0.md @@ -0,0 +1,43 @@ +## ERPNext v12.9.0 Release Note + +### Enhancements +- Pick List enhancements [#20962](https://github.com/frappe/erpnext/pull/20962) + - The purpose **Delivery Against Sales Order** has been changed to **Delivery** and patch for existing records. + - If the purpose is Delivery then allow rows without Sales Order against them to be mapped to the Delivery Note. + - **Update Current Stock** button to update locations and quantity after Submit. + - Validations if Item Locations table is empty (on creation of Delivery Note, Stock Entry). + - Company-wise fetching of locations and quantity. +- Payment allocation on Payment Entry based on invoice payment terms. [#20945](https://github.com/frappe/erpnext/pull/20945) +- Allow Tax Withholding Category selection at invoice level [#20870](https://github.com/frappe/erpnext/pull/20870) +- Enhanced Employee Leave Balance report, added new fields New Allocation, Expired Leaves. [#21282](https://github.com/frappe/erpnext/pull/21282) +- Provision to set Default Item Manufacturer. [#21197](https://github.com/frappe/erpnext/pull/21197) +- Tax Amount in Credit Note print format should be shown in positive. [#21252](https://github.com/frappe/erpnext/pull/21252) +- On creation of return from employee advance, sets default voucher type as Bank Entry and default debit account as Cash. [#21411](https://github.com/frappe/erpnext/pull/21411) +- On saving a Contact linked with a Lead, update the contact info from Contact into the Lead. [#21469](https://github.com/frappe/erpnext/pull/21469) +- Warning on making payment against paid invoices. [#21501](https://github.com/frappe/erpnext/pull/21501) +- Enhanced Stock Balance report with color-coding. [#21516](https://github.com/frappe/erpnext/pull/21516) +- Added total row in sales analytics report [#21519](https://github.com/frappe/erpnext/pull/21519) +- Asset related accounts must be in company currency. [#21524](https://github.com/frappe/erpnext/pull/21524) +- Accounting Dimensions in Period Closing Voucher. [#21564](https://github.com/frappe/erpnext/pull/21564) +- Renamed LMS to Learning Management System. [#21645](https://github.com/frappe/erpnext/pull/21645) +- Allow half-day attendance only via leave application. [#21719](https://github.com/frappe/erpnext/pull/21719) +- In BOM, allowed Price List in other than company currency. [#21585](https://github.com/frappe/erpnext/pull/21585) + +### Fixes: +- Account Type validation for accounts selected in Asset Category. [#21102](https://github.com/frappe/erpnext/pull/21102) +- Warehouse unset if an item doesn't have a default warehouse. [#21285](https://github.com/frappe/erpnext/pull/21285) +- Bin Requested Qty should be calculated for customer-provided items. [#21300](https://github.com/frappe/erpnext/pull/21300) +- On change of item in sales and purchase transactions, UOM should be reset based on the item's default UOM. [#21254](https://github.com/frappe/erpnext/pull/21254) +- Target warehouse in Delivery Note and Sales Invoice should not be set based on user permission. Patch to fix affected records. [#21359](https://github.com/frappe/erpnext/pull/21359) +- Budget validation against an Accounting Dimension was missing. [#21268](https://github.com/frappe/erpnext/pull/21268) +- On change of qty in Stock Entry, the fields in base currency were not set for non-serialized items. [#21389](https://github.com/frappe/erpnext/pull/21389) +- Payment request not able to make against fees [#21486](https://github.com/frappe/erpnext/pull/21486) +- Cost Center renaming is allowed only from Cost Center form [#21503](https://github.com/frappe/erpnext/pull/21503) +- Accounts Payable report showing the advance amount of other company [#21548](https://github.com/frappe/erpnext/pull/21548) +- Heatmap was not working for customer and supplier [#21578](https://github.com/frappe/erpnext/pull/21578) +- Item tax template set in the Item master is not fetched into the sales invoice and taxes are not shown in the offline pos. [#21714](https://github.com/frappe/erpnext/pull/21714) +- Validate duplicate creation of expiry ledger entry for carry forward allocation and patch to remove duplicate ledgers. [#21505](https://github.com/frappe/erpnext/pull/21505) +- Dimensions were not getting added for some GL Entries and were missing in some recently added transactions. [#21689](https://github.com/frappe/erpnext/pull/21689) +- In Repack entry, set rate for finished goods based on the cost of raw materials. [#21736](https://github.com/frappe/erpnext/pull/21736) +- Removed Guest access from Lead. [#21692](https://github.com/frappe/erpnext/pull/21692) +- Standard and Custom queries did not show search fields for Link fields. [#21685](https://github.com/frappe/erpnext/pull/21685) \ No newline at end of file diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 59c371200c8..e5012f972b2 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -6,6 +6,7 @@ import frappe from frappe import _, msgprint from frappe.utils import flt,cint, cstr, getdate from six import iteritems +from collections import OrderedDict from erpnext.accounts.party import get_party_details from erpnext.stock.get_item_details import get_conversion_factor from erpnext.buying.utils import validate_for_items, update_last_purchase_rate @@ -294,6 +295,9 @@ class BuyingController(StockController): for raw_material in transferred_raw_materials + non_stock_items: rm_item_key = (raw_material.rm_item_code, item.item_code, item.purchase_order) raw_material_data = backflushed_raw_materials_map.get(rm_item_key, {}) + if not raw_material_data and raw_material.get('batch_nos'): + backflushed_raw_materials_map.setdefault(rm_item_key, {'consumed_batch': {}}) + raw_material_data = backflushed_raw_materials_map.get(rm_item_key, {}) consumed_qty = raw_material_data.get('qty', 0) consumed_serial_nos = raw_material_data.get('serial_no', '') @@ -325,14 +329,17 @@ class BuyingController(StockController): batches_qty = get_batches_with_qty(raw_material.rm_item_code, raw_material.main_item_code, qty, transferred_batch_qty_map, backflushed_batch_qty_map, item.purchase_order) + for batch_data in batches_qty: qty = batch_data['qty'] raw_material.batch_no = batch_data['batch'] - self.append_raw_material_to_be_backflushed(item, raw_material, qty) + if qty > 0: + self.append_raw_material_to_be_backflushed(item, raw_material, qty) else: self.append_raw_material_to_be_backflushed(item, raw_material, qty) def append_raw_material_to_be_backflushed(self, fg_item_doc, raw_material_data, qty): + qty = flt(qty, fg_item_doc.precision('qty')) rm = self.append('supplied_items', {}) rm.update(raw_material_data) @@ -790,9 +797,10 @@ class BuyingController(StockController): if not self.get("items"): return - earliest_schedule_date = min([d.schedule_date for d in self.get("items")]) - if earliest_schedule_date: - self.schedule_date = earliest_schedule_date + if any(d.schedule_date for d in self.get("items")): + # Select earliest schedule_date. + self.schedule_date = min(d.schedule_date for d in self.get("items") + if d.schedule_date is not None) if self.schedule_date: for d in self.get('items'): @@ -973,8 +981,16 @@ def get_non_stock_items(purchase_order, fg_item_code): def set_serial_nos(raw_material, consumed_serial_nos, qty): - serial_nos = set(get_serial_nos(raw_material.serial_nos)) - \ - set(get_serial_nos(consumed_serial_nos)) + consumed_serial_nos_list = [] + + if isinstance(consumed_serial_nos, list): + for row in consumed_serial_nos: + consumed_serial_nos_list.extend(get_serial_nos(row)) + else: + consumed_serial_nos_list = get_serial_nos(row) + + serial_nos = set(get_serial_nos(raw_material.serial_nos)) - set(consumed_serial_nos_list) + if serial_nos and qty <= len(serial_nos): raw_material.serial_no = '\n'.join(list(serial_nos)[0:frappe.utils.cint(qty)]) @@ -1009,7 +1025,7 @@ def get_transferred_batch_qty_map(purchase_order, fg_item): for batch_data in transferred_batches: key = ((batch_data.item_code, fg_item) if batch_data.subcontracted_item else (batch_data.item_code, purchase_order)) - transferred_batch_qty_map.setdefault(key, {}) + transferred_batch_qty_map.setdefault(key, OrderedDict()) transferred_batch_qty_map[key][batch_data.batch_no] = batch_data.qty return transferred_batch_qty_map @@ -1062,8 +1078,14 @@ def get_batches_with_qty(item_code, fg_item, required_qty, transferred_batch_qty if available_qty >= required_qty: available_batches.append({'batch': batch, 'qty': required_qty}) break - else: + elif available_qty != 0: available_batches.append({'batch': batch, 'qty': available_qty}) required_qty -= available_qty + for row in available_batches: + if backflushed_batches.get(row.get('batch'), 0) > 0: + backflushed_batches[row.get('batch')] += row.get('qty') + else: + backflushed_batches.setdefault(row.get('batch'), row.get('qty')) + return available_batches diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index afc63fc8f51..b664df82470 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -320,7 +320,7 @@ def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, and status not in ("Stopped", "Closed") %(fcond)s and ( (`tabDelivery Note`.is_return = 0 and `tabDelivery Note`.per_billed < 100) - or `tabDelivery Note`.grand_total = 0 + or (`tabDelivery Note`.grand_total = 0 and `tabDelivery Note`.per_billed < 100) or ( `tabDelivery Note`.is_return = 1 and return_against in (select name from `tabDelivery Note` where per_billed < 100) diff --git a/erpnext/crm/doctype/appointment/appointment.json b/erpnext/crm/doctype/appointment/appointment.json index 32df8ec4295..7dff80855bc 100644 --- a/erpnext/crm/doctype/appointment/appointment.json +++ b/erpnext/crm/doctype/appointment/appointment.json @@ -93,7 +93,7 @@ "fieldtype": "Column Break" } ], - "modified": "2019-10-14 15:23:54.630731", + "modified": "2021-06-28 16:27:53.235714", "modified_by": "Administrator", "module": "CRM", "name": "Appointment", @@ -144,6 +144,18 @@ "role": "Sales User", "share": 1, "write": 1 + }, + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Employee", + "share": 1, + "write": 1 } ], "quick_entry": 1, diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json index 918acbfd885..53d3bcc1646 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.json +++ b/erpnext/crm/doctype/opportunity/opportunity.json @@ -277,7 +277,6 @@ "read_only": 1 }, { - "depends_on": "eval:", "fieldname": "territory", "fieldtype": "Link", "label": "Territory", @@ -413,7 +412,7 @@ ], "icon": "fa fa-info-sign", "idx": 195, - "modified": "2020-08-12 23:34:39.665513", + "modified": "2021-06-04 10:11:22.831139", "modified_by": "Administrator", "module": "CRM", "name": "Opportunity", diff --git a/erpnext/crm/doctype/sales_stage/sales_stage.json b/erpnext/crm/doctype/sales_stage/sales_stage.json index 85cc9599983..29475b4d072 100644 --- a/erpnext/crm/doctype/sales_stage/sales_stage.json +++ b/erpnext/crm/doctype/sales_stage/sales_stage.json @@ -41,4 +41,4 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py index 76825cec1b2..68e752b4574 100644 --- a/erpnext/education/doctype/student/student.py +++ b/erpnext/education/doctype/student/student.py @@ -58,7 +58,6 @@ class Student(Document): student_user.flags.ignore_permissions = True student_user.add_roles("Student") student_user.save() - update_password_link = student_user.reset_password() def update_applicant_status(self): """Updates Student Applicant status to Admitted""" diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py index e0b278c2b1d..9f833dba328 100644 --- a/erpnext/education/utils.py +++ b/erpnext/education/utils.py @@ -345,11 +345,11 @@ def get_or_create_course_enrollment(course, program): student = get_current_student() course_enrollment = get_enrollment("course", course, student.name) if not course_enrollment: - program_enrollment = get_enrollment('program', program, student.name) + program_enrollment = get_enrollment('program', program.name, student.name) if not program_enrollment: frappe.throw(_("You are not enrolled in program {0}".format(program))) return - return student.enroll_in_course(course_name=course, program_enrollment=get_enrollment('program', program, student.name)) + return student.enroll_in_course(course_name=course, program_enrollment=get_enrollment('program', program.name, student.name)) else: return frappe.get_doc('Course Enrollment', course_enrollment) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py index 5f990cdd034..42d4b9b2b43 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py @@ -99,5 +99,7 @@ class PlaidConnector(): response = self.client.Transactions.get(self.access_token, start_date=start_date, end_date=end_date, offset=len(transactions)) transactions.extend(response["transactions"]) return transactions + except ItemError as e: + raise e except Exception: frappe.log_error(frappe.get_traceback(), _("Plaid transactions sync error")) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js index 72705158251..6d59895258d 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.js @@ -15,6 +15,10 @@ frappe.ui.form.on('Plaid Settings', { frm.add_custom_button(__('Link a new bank account'), () => { new erpnext.integrations.plaidLink(frm); }); + + frm.add_custom_button(__('Reset Plaid Link'), () => { + new erpnext.integrations.plaidLink(frm); + }); } } }); diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py index ae8abf2eb15..75b2bd6b810 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py @@ -12,6 +12,7 @@ from frappe.desk.doctype.tag.tag import add_tag from frappe.model.document import Document from frappe.utils import add_months, formatdate, getdate, today +from plaid.errors import ItemError class PlaidSettings(Document): @staticmethod @@ -50,7 +51,7 @@ def add_institution(token, response): }) bank.insert() except Exception: - frappe.throw(frappe.get_traceback()) + frappe.log_error(frappe.get_traceback(), title=_('Plaid Link Error')) else: bank = frappe.get_doc("Bank", response["institution"]["name"]) bank.plaid_access_token = access_token @@ -82,7 +83,12 @@ def add_bank_accounts(response, bank, company): if not acc_subtype: add_account_subtype(account["subtype"]) - if not frappe.db.exists("Bank Account", dict(integration_id=account["id"])): + existing_bank_account = frappe.db.exists("Bank Account", { + 'account_name': account["name"], + 'bank': bank["bank_name"] + }) + + if not existing_bank_account: try: new_account = frappe.get_doc({ "doctype": "Bank Account", @@ -102,10 +108,27 @@ def add_bank_accounts(response, bank, company): except frappe.UniqueValidationError: frappe.msgprint(_("Bank account {0} already exists and could not be created again").format(account["name"])) except Exception: - frappe.throw(frappe.get_traceback()) + frappe.log_error(frappe.get_traceback(), title=_("Plaid Link Error")) + frappe.throw(_("There was an error creating Bank Account while linking with Plaid."), + title=_("Plaid Link Failed")) else: - result.append(frappe.db.get_value("Bank Account", dict(integration_id=account["id"]), "name")) + try: + existing_account = frappe.get_doc('Bank Account', existing_bank_account) + existing_account.update({ + "bank": bank["bank_name"], + "account_name": account["name"], + "account_type": account.get("type", ""), + "account_subtype": account.get("subtype", ""), + "mask": account.get("mask", ""), + "integration_id": account["id"] + }) + existing_account.save() + result.append(existing_bank_account) + except Exception: + frappe.log_error(frappe.get_traceback(), title=_("Plaid Link Error")) + frappe.throw(_("There was an error updating Bank Account {} while linking with Plaid.").format( + existing_bank_account), title=_("Plaid Link Failed")) return result @@ -146,8 +169,9 @@ def sync_transactions(bank, bank_account): transactions = get_transactions(bank=bank, bank_account=bank_account, start_date=start_date, end_date=end_date) result = [] - for transaction in reversed(transactions): - result += new_bank_transaction(transaction) + if transactions: + for transaction in reversed(transactions): + result += new_bank_transaction(transaction) if result: last_transaction_date = frappe.db.get_value('Bank Transaction', result.pop(), 'date') @@ -173,9 +197,16 @@ def get_transactions(bank, bank_account=None, start_date=None, end_date=None): account_id = None plaid = PlaidConnector(access_token) - transactions = plaid.get_transactions(start_date=start_date, end_date=end_date, account_id=account_id) - return transactions + try: + transactions = plaid.get_transactions(start_date=start_date, end_date=end_date, account_id=account_id) + except ItemError as e: + if e.code == "ITEM_LOGIN_REQUIRED": + msg = _("There was an error syncing transactions.") + " " + msg += _("Please refresh or reset the Plaid linking of the Bank {}.").format(bank) + " " + frappe.log_error(msg, title=_("Plaid Link Refresh Required")) + + return transactions or [] def new_bank_transaction(transaction): diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py b/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py index 25ffd281099..c58b70ccd19 100644 --- a/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py +++ b/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.py @@ -30,7 +30,7 @@ class ShopifySettings(Document): webhooks = ["orders/create", "orders/paid", "orders/fulfilled"] # url = get_shopify_url('admin/webhooks.json', self) created_webhooks = [d.method for d in self.webhooks] - url = get_shopify_url('admin/api/2020-04/webhooks.json', self) + url = get_shopify_url('admin/api/2021-04/webhooks.json', self) for method in webhooks: session = get_request_session() try: @@ -56,7 +56,7 @@ class ShopifySettings(Document): deleted_webhooks = [] for d in self.webhooks: - url = get_shopify_url('admin/api/2020-04/webhooks/{0}.json'.format(d.webhook_id), self) + url = get_shopify_url('admin/api/2021-04/webhooks/{0}.json'.format(d.webhook_id), self) try: res = session.delete(url, headers=get_header(self)) res.raise_for_status() diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py index 7866fdea31a..2af57f4c891 100644 --- a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py +++ b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py @@ -32,10 +32,12 @@ def create_customer(shopify_customer, shopify_settings): raise e def create_customer_address(customer, shopify_customer): - if not shopify_customer.get("addresses"): - return + addresses = shopify_customer.get("addresses", []) - for i, address in enumerate(shopify_customer.get("addresses")): + if not addresses and "default_address" in shopify_customer: + addresses.append(shopify_customer["default_address"]) + + for i, address in enumerate(addresses): address_title, address_type = get_address_title_and_type(customer.customer_name, i) try : frappe.get_doc({ diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py index f9f0bb3cecc..16efb6caee1 100644 --- a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py +++ b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py @@ -8,7 +8,7 @@ from erpnext.erpnext_integrations.doctype.shopify_settings.shopify_settings impo shopify_variants_attr_list = ["option1", "option2", "option3"] def sync_item_from_shopify(shopify_settings, item): - url = get_shopify_url("admin/api/2020-04/products/{0}.json".format(item.get("product_id")), shopify_settings) + url = get_shopify_url("admin/api/2021-04/products/{0}.json".format(item.get("product_id")), shopify_settings) session = get_request_session() try: diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/test_shopify_settings.py b/erpnext/erpnext_integrations/doctype/shopify_settings/test_shopify_settings.py index 64ef3dc0859..58e64e83bf8 100644 --- a/erpnext/erpnext_integrations/doctype/shopify_settings/test_shopify_settings.py +++ b/erpnext/erpnext_integrations/doctype/shopify_settings/test_shopify_settings.py @@ -17,8 +17,7 @@ class ShopifySettings(unittest.TestCase): frappe.set_user("Administrator") # use the fixture data - import_doc(path=frappe.get_app_path("erpnext", "erpnext_integrations/doctype/shopify_settings/test_data/custom_field.json"), - ignore_links=True, overwrite=True) + import_doc(path=frappe.get_app_path("erpnext", "erpnext_integrations/doctype/shopify_settings/test_data/custom_field.json")) frappe.reload_doctype("Customer") frappe.reload_doctype("Sales Order") diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 2d995ed0e67..56bffdd5637 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -246,7 +246,7 @@ doc_events = { "on_submit": ["erpnext.regional.create_transaction_log", "erpnext.regional.italy.utils.sales_invoice_on_submit"], "on_cancel": "erpnext.regional.italy.utils.sales_invoice_on_cancel", "on_trash": "erpnext.regional.check_deletion_permission", - "validate": "erpnext.regional.india.utils.set_transporter_address" + "validate": ["erpnext.regional.india.utils.set_transporter_address", "erpnext.regional.india.utils.update_taxable_values", "erpnext.regional.india.utils.validate_document_name"] }, "Purchase Invoice": { "validate": "erpnext.regional.india.utils.update_grand_total_for_rcm" @@ -261,9 +261,6 @@ doc_events = { ('Sales Invoice', 'Sales Order', 'Delivery Note', 'Purchase Invoice', 'Purchase Order', 'Purchase Receipt'): { 'validate': ['erpnext.regional.india.utils.set_place_of_supply'] }, - ('Sales Invoice', 'Purchase Invoice'): { - 'validate': ['erpnext.regional.india.utils.validate_document_name'] - }, "Contact": { "on_trash": "erpnext.support.doctype.issue.issue.update_issue", "after_insert": "erpnext.communication.doctype.call_log.call_log.set_caller_information", diff --git a/erpnext/hr/doctype/attendance/attendance.json b/erpnext/hr/doctype/attendance/attendance.json index 20974a0b7d2..fb102a4aa17 100644 --- a/erpnext/hr/doctype/attendance/attendance.json +++ b/erpnext/hr/doctype/attendance/attendance.json @@ -78,7 +78,7 @@ "search_index": 1 }, { - "depends_on": "eval:doc.status==\"On Leave\"", + "depends_on": "eval:doc.status==\"On Leave\" || doc.status==\"Half Day\"", "fieldname": "leave_type", "fieldtype": "Link", "in_standard_filter": 1, @@ -174,7 +174,7 @@ "icon": "fa fa-ok", "idx": 1, "is_submittable": 1, - "modified": "2020-02-19 14:25:32.945842", + "modified": "2021-06-30 14:42:39.162146", "modified_by": "Administrator", "module": "HR", "name": "Attendance", diff --git a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py index 7a9727f18c4..f11f08462ad 100644 --- a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py +++ b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals import frappe from frappe import _ -from frappe.utils import date_diff, add_days, getdate, cint +from frappe.utils import date_diff, add_days, getdate, cint, formatdate as format_date from frappe.model.document import Document from erpnext.hr.utils import validate_dates, validate_overlap, get_leave_period, \ get_holidays_for_employee, create_additional_leave_ledger_entry @@ -40,7 +40,12 @@ class CompensatoryLeaveRequest(Document): def validate_holidays(self): holidays = get_holidays_for_employee(self.employee, self.work_from_date, self.work_end_date) if len(holidays) < date_diff(self.work_end_date, self.work_from_date) + 1: - frappe.throw(_("Compensatory leave request days not in valid holidays")) + if date_diff(self.work_end_date, self.work_from_date): + msg = _("The days between {0} to {1} are not valid holidays.").format(frappe.bold(format_date(self.work_from_date)), frappe.bold(format_date(self.work_end_date))) + else: + msg = _("{0} is not a holiday.").format(frappe.bold(format_date(self.work_from_date))) + + frappe.throw(msg) def on_submit(self): company = frappe.db.get_value("Employee", self.employee, "company") @@ -63,7 +68,7 @@ class CompensatoryLeaveRequest(Document): leave_allocation = self.create_leave_allocation(leave_period, date_difference) self.leave_allocation=leave_allocation.name else: - frappe.throw(_("There is no leave period in between {0} and {1}").format(self.work_from_date, self.work_end_date)) + frappe.throw(_("There is no leave period in between {0} and {1}").format(format_date(self.work_from_date), format_date(self.work_end_date))) def on_cancel(self): if self.leave_allocation: diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py index a746a9c3a8b..01fc5cf6c20 100755 --- a/erpnext/hr/doctype/employee/employee.py +++ b/erpnext/hr/doctype/employee/employee.py @@ -57,6 +57,9 @@ class Employee(NestedSet): remove_user_permission( "Employee", self.name, existing_user_id) + def after_rename(self, old, new, merge): + self.db_set("employee", new) + def set_employee_name(self): self.employee_name = ' '.join(filter(lambda x: x, [self.first_name, self.middle_name, self.last_name])) diff --git a/erpnext/hr/doctype/employee_other_income/employee_other_income.json b/erpnext/hr/doctype/employee_other_income/employee_other_income.json index 8abfe1e93a8..26df6185444 100644 --- a/erpnext/hr/doctype/employee_other_income/employee_other_income.json +++ b/erpnext/hr/doctype/employee_other_income/employee_other_income.json @@ -76,7 +76,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2020-05-14 17:17:38.883126", + "modified": "2020-05-18 17:17:38.883126", "modified_by": "Administrator", "module": "HR", "name": "Employee Other Income", diff --git a/erpnext/hr/doctype/employee_separation/employee_separation.json b/erpnext/hr/doctype/employee_separation/employee_separation.json index f44d83060aa..7af209887f0 100644 --- a/erpnext/hr/doctype/employee_separation/employee_separation.json +++ b/erpnext/hr/doctype/employee_separation/employee_separation.json @@ -1,626 +1,177 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "HR-EMP-SEP-.YYYY.-.#####", - "beta": 0, - "creation": "2018-05-10 02:29:16.740490", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", + "actions": [], + "autoname": "HR-EMP-SEP-.YYYY.-.#####", + "creation": "2018-05-10 02:29:16.740490", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "employee", + "employee_name", + "department", + "designation", + "employee_grade", + "column_break_7", + "company", + "boarding_status", + "resignation_letter_date", + "project", + "table_for_activity", + "employee_separation_template", + "activities", + "notify_users_by_email", + "section_break_14", + "exit_interview", + "amended_from" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "employee", - "fieldtype": "Link", - "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": "Employee", - "length": 0, - "no_copy": 0, - "options": "Employee", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.employee_name", - "fieldname": "employee_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Employee Name", - "length": 0, - "no_copy": 0, - "options": "", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.resignation_letter_date", - "fieldname": "resignation_letter_date", - "fieldtype": "Date", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Resignation Letter Date", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "boarding_status", - "fieldtype": "Select", - "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": "Status", - "length": 0, - "no_copy": 0, - "options": "\nPending\nIn Process\nCompleted", - "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": "employee", + "fieldtype": "Link", + "label": "Employee", + "options": "Employee", + "reqd": 1 }, { - "allow_bulk_edit": 0, - "allow_bulk_edit": 0, - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_in_quick_entry": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "notify_users_by_email", - "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": "Notify users by email", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break_7", - "fieldtype": "Column 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, - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "employee_separation_template", - "fieldtype": "Link", - "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": "Employee Separation Template", - "length": 0, - "no_copy": 0, - "options": "Employee Separation Template", - "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 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.company", - "fieldname": "company", - "fieldtype": "Link", - "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": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "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 + "fetch_from": "employee.employee_name", + "fieldname": "employee_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Employee Name", + "read_only": 1 }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "project", - "fieldtype": "Link", - "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": "Project", - "length": 0, - "no_copy": 0, - "options": "Project", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fetch_from": "employee.resignation_letter_date", + "fieldname": "resignation_letter_date", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Resignation Letter Date", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.department", - "fieldname": "department", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Department", - "length": 0, - "no_copy": 0, - "options": "Department", - "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 - }, + "allow_on_submit": 1, + "fieldname": "boarding_status", + "fieldtype": "Select", + "label": "Status", + "options": "\nPending\nIn Process\nCompleted", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.designation", - "fieldname": "designation", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Designation", - "length": 0, - "no_copy": 0, - "options": "Designation", - "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 - }, + "allow_on_submit": 1, + "default": "0", + "fieldname": "notify_users_by_email", + "fieldtype": "Check", + "label": "Notify users by email" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fetch_from": "employee.grade", - "fieldname": "employee_grade", - "fieldtype": "Link", - "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": "Employee Grade", - "length": 0, - "no_copy": 0, - "options": "Employee Grade", - "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": "column_break_7", + "fieldtype": "Column Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "table_for_activity", - "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": "", - "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": "employee_separation_template", + "fieldtype": "Link", + "label": "Employee Separation Template", + "options": "Employee Separation Template" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "activities", - "fieldtype": "Table", - "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": "Activities", - "length": 0, - "no_copy": 0, - "options": "Employee Boarding Activity", - "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 - }, + "fetch_from": "employee.company", + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "section_break_14", - "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, - "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": "project", + "fieldtype": "Link", + "label": "Project", + "options": "Project", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "exit_interview", - "fieldtype": "Text Editor", - "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": "Exit Interview Summary", - "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 - }, + "fetch_from": "employee.department", + "fieldname": "department", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Department", + "options": "Department", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "amended_from", - "fieldtype": "Link", - "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": "Amended From", - "length": 0, - "no_copy": 1, - "options": "Employee Separation", - "permlevel": 0, - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "fetch_from": "employee.designation", + "fieldname": "designation", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Designation", + "options": "Designation", + "read_only": 1 + }, + { + "fetch_from": "employee.grade", + "fieldname": "employee_grade", + "fieldtype": "Link", + "label": "Employee Grade", + "options": "Employee Grade", + "read_only": 1 + }, + { + "fieldname": "table_for_activity", + "fieldtype": "Section Break", + "label": "Separation Activities" + }, + { + "allow_on_submit": 1, + "fieldname": "activities", + "fieldtype": "Table", + "label": "Activities", + "options": "Employee Boarding Activity" + }, + { + "fieldname": "section_break_14", + "fieldtype": "Section Break" + }, + { + "fieldname": "exit_interview", + "fieldtype": "Text Editor", + "label": "Exit Interview Summary" + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Employee Separation", + "print_hide": 1, + "read_only": 1 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-08-03 16:15:39.025898", - "modified_by": "Administrator", - "module": "HR", - "name": "Employee Separation", - "name_case": "", - "owner": "Administrator", + ], + "is_submittable": 1, + "links": [], + "modified": "2021-04-28 15:58:36.020196", + "modified_by": "Administrator", + "module": "HR", + "name": "Employee Separation", + "owner": "Administrator", "permissions": [ { - "amend": 1, - "cancel": 1, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 1, + "amend": 1, + "cancel": 1, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "submit": 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", - "title_field": "employee_name", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "employee_name", + "track_changes": 1 } \ No newline at end of file diff --git a/erpnext/hr/doctype/employee_separation/test_employee_separation.py b/erpnext/hr/doctype/employee_separation/test_employee_separation.py index 2fa114d3452..713fcf526b5 100644 --- a/erpnext/hr/doctype/employee_separation/test_employee_separation.py +++ b/erpnext/hr/doctype/employee_separation/test_employee_separation.py @@ -18,7 +18,7 @@ class TestEmployeeSeparation(unittest.TestCase): 'activity_name': 'Deactivate Employee', 'role': 'HR User' }) - separation.status = 'Pending' + separation.boarding_status = 'Pending' separation.insert() separation.submit() self.assertEqual(separation.docstatus, 1) diff --git a/erpnext/hr/doctype/job_applicant/job_applicant_list.js b/erpnext/hr/doctype/job_applicant/job_applicant_list.js index 3b9141ba79c..2ad0d591d8c 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant_list.js +++ b/erpnext/hr/doctype/job_applicant/job_applicant_list.js @@ -2,7 +2,7 @@ // MIT License. See license.txt frappe.listview_settings['Job Applicant'] = { - add_fields: ["company", "designation", "job_applicant", "status"], + add_fields: ["status"], get_indicator: function (doc) { if (doc.status == "Accepted") { return [__(doc.status), "green", "status,=," + doc.status]; diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py index fc18d7a4cab..dde913a9b62 100644 --- a/erpnext/hr/doctype/leave_application/test_leave_application.py +++ b/erpnext/hr/doctype/leave_application/test_leave_application.py @@ -624,4 +624,4 @@ def allocate_leaves(employee, leave_period, leave_type, new_leaves_allocated, el "docstatus": 1 }).insert() - allocate_leave.submit() \ No newline at end of file + allocate_leave.submit() diff --git a/erpnext/hr/doctype/loan_application/loan_application.js b/erpnext/hr/doctype/loan_application/loan_application.js index a73b62a894e..eae419accab 100644 --- a/erpnext/hr/doctype/loan_application/loan_application.js +++ b/erpnext/hr/doctype/loan_application/loan_application.js @@ -5,8 +5,8 @@ frappe.ui.form.on('Loan Application', { refresh: function(frm) { - frm.trigger("toggle_fields") - frm.trigger("add_toolbar_buttons") + frm.trigger("toggle_fields"); + frm.trigger("add_toolbar_buttons"); }, repayment_method: function(frm) { frm.doc.repayment_amount = frm.doc.repayment_periods = "" diff --git a/erpnext/hr/doctype/salary_component/salary_component.js b/erpnext/hr/doctype/salary_component/salary_component.js index c455eb3303b..f2a0e2e715d 100644 --- a/erpnext/hr/doctype/salary_component/salary_component.js +++ b/erpnext/hr/doctype/salary_component/salary_component.js @@ -5,10 +5,17 @@ frappe.ui.form.on('Salary Component', { setup: function(frm) { frm.set_query("default_account", "accounts", function(doc, cdt, cdn) { var d = locals[cdt][cdn]; + + var root_type = "Liability"; + if (frm.doc.type == "Deduction") { + root_type = "Expense"; + } + return { filters: { "is_group": 0, - "company": d.company + "company": d.company, + "root_type": root_type } }; }); diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py index 6e6ae4351c8..2213fa6fb57 100644 --- a/erpnext/hr/doctype/salary_slip/salary_slip.py +++ b/erpnext/hr/doctype/salary_slip/salary_slip.py @@ -869,8 +869,8 @@ class SalarySlip(TransactionBase): `tabRepayment Schedule` as rps, `tabLoan` as l where l.name = rps.parent and rps.payment_date between %s and %s and - l.repay_from_salary = 1 and l.docstatus = 1 and l.applicant = %s""", - (self.start_date, self.end_date, self.employee), as_dict=True) or [] + l.repay_from_salary = 1 and l.docstatus = 1 and l.applicant = %s and l.company = %s""", + (self.start_date, self.end_date, self.employee, self.company), as_dict=True) or [] def update_salary_slip_in_additional_salary(self): salary_slip = self.name if self.docstatus==1 else None diff --git a/erpnext/hr/doctype/staffing_plan/staffing_plan.py b/erpnext/hr/doctype/staffing_plan/staffing_plan.py index 595bcaa8d4a..c2a25d84e9d 100644 --- a/erpnext/hr/doctype/staffing_plan/staffing_plan.py +++ b/erpnext/hr/doctype/staffing_plan/staffing_plan.py @@ -40,7 +40,7 @@ class StaffingPlan(Document): detail.current_openings = designation_counts['job_openings'] if detail.number_of_positions > 0: - if detail.vacancies > 0 and detail.estimated_cost_per_position: + if detail.vacancies and detail.estimated_cost_per_position: detail.total_estimated_cost = cint(detail.vacancies) * flt(detail.estimated_cost_per_position) self.total_estimated_budget += detail.total_estimated_cost @@ -57,8 +57,7 @@ class StaffingPlan(Document): and sp.to_date >= %s and sp.from_date <= %s and sp.company = %s """, (staffing_plan_detail.designation, self.from_date, self.to_date, self.company)) if overlap and overlap [0][0]: - frappe.throw(_("Staffing Plan {0} already exist for designation {1}" - .format(overlap[0][0], staffing_plan_detail.designation))) + frappe.throw(_("Staffing Plan {0} already exist for designation {1}").format(overlap[0][0], staffing_plan_detail.designation)) def validate_with_parent_plan(self, staffing_plan_detail): if not frappe.get_cached_value('Company', self.company, "parent_company"): @@ -75,12 +74,12 @@ class StaffingPlan(Document): if cint(staffing_plan_detail.vacancies) > cint(parent_plan_details[0].vacancies) or \ flt(staffing_plan_detail.total_estimated_cost) > flt(parent_plan_details[0].total_estimated_cost): frappe.throw(_("You can only plan for upto {0} vacancies and budget {1} \ - for {2} as per staffing plan {3} for parent company {4}." - .format(cint(parent_plan_details[0].vacancies), + for {2} as per staffing plan {3} for parent company {4}.").format( + cint(parent_plan_details[0].vacancies), parent_plan_details[0].total_estimated_cost, frappe.bold(staffing_plan_detail.designation), parent_plan_details[0].name, - parent_company)), ParentCompanyError) + parent_company), ParentCompanyError) #Get vacanices already planned for all companies down the hierarchy of Parent Company lft, rgt = frappe.get_cached_value('Company', parent_company, ["lft", "rgt"]) @@ -97,14 +96,14 @@ class StaffingPlan(Document): (flt(parent_plan_details[0].total_estimated_cost) < \ (flt(staffing_plan_detail.total_estimated_cost) + flt(all_sibling_details.total_estimated_cost))): frappe.throw(_("{0} vacancies and {1} budget for {2} already planned for subsidiary companies of {3}. \ - You can only plan for upto {4} vacancies and and budget {5} as per staffing plan {6} for parent company {3}." - .format(cint(all_sibling_details.vacancies), + You can only plan for upto {4} vacancies and and budget {5} as per staffing plan {6} for parent company {3}.").format( + cint(all_sibling_details.vacancies), all_sibling_details.total_estimated_cost, frappe.bold(staffing_plan_detail.designation), parent_company, cint(parent_plan_details[0].vacancies), parent_plan_details[0].total_estimated_cost, - parent_plan_details[0].name))) + parent_plan_details[0].name)) def validate_with_subsidiary_plans(self, staffing_plan_detail): #Valdate this plan with all child company plan @@ -120,11 +119,11 @@ class StaffingPlan(Document): cint(staffing_plan_detail.vacancies) < cint(children_details.vacancies) or \ flt(staffing_plan_detail.total_estimated_cost) < flt(children_details.total_estimated_cost): frappe.throw(_("Subsidiary companies have already planned for {1} vacancies at a budget of {2}. \ - Staffing Plan for {0} should allocate more vacancies and budget for {3} than planned for its subsidiary companies" - .format(self.company, + Staffing Plan for {0} should allocate more vacancies and budget for {3} than planned for its subsidiary companies").format( + self.company, cint(children_details.vacancies), children_details.total_estimated_cost, - frappe.bold(staffing_plan_detail.designation))), SubsidiaryCompanyError) + frappe.bold(staffing_plan_detail.designation)), SubsidiaryCompanyError) @frappe.whitelist() def get_designation_counts(designation, company): diff --git a/erpnext/hr/utils.py b/erpnext/hr/utils.py index 5a1959f11db..d87e3569f44 100644 --- a/erpnext/hr/utils.py +++ b/erpnext/hr/utils.py @@ -32,13 +32,15 @@ class EmployeeBoardingController(Document): project_name += self.job_applicant else: project_name += self.employee + project = frappe.get_doc({ "doctype": "Project", "project_name": project_name, "expected_start_date": self.date_of_joining if self.doctype == "Employee Onboarding" else self.resignation_letter_date, "department": self.department, "company": self.company - }).insert(ignore_permissions=True) + }).insert(ignore_permissions=True, ignore_mandatory=True) + self.db_set("project", project.name) self.db_set("boarding_status", "Pending") self.reload() diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 7b924f7025a..dfb4a03c3f4 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -39,6 +39,8 @@ class JobCard(Document): if d.completed_qty: self.total_completed_qty += d.completed_qty + self.total_completed_qty = flt(self.total_completed_qty, self.precision("total_completed_qty")) + def get_overlap_for(self, args): existing = frappe.db.sql("""select jc.name as name from `tabJob Card Time Log` jctl, `tabJob Card` jc where jctl.parent = jc.name and diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js index cb8d3a02068..be4babe417a 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.js +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js @@ -24,6 +24,16 @@ frappe.ui.form.on('Production Plan', { } }); + frm.set_query('material_request', 'material_requests', function() { + return { + filters: { + material_request_type: "Manufacture", + docstatus: 1, + status: ["!=", "Stopped"], + } + }; + }); + frm.fields_dict['po_items'].grid.get_field('item_code').get_query = function(doc) { return { query: "erpnext.controllers.queries.item_query", diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 5a193d7e4bf..1b2cd542a4f 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -68,7 +68,7 @@ class ProductionPlan(Document): from `tabMaterial Request` mr, `tabMaterial Request Item` mr_item where mr_item.parent = mr.name and mr.material_request_type = "Manufacture" - and mr.docstatus = 1 and mr.company = %(company)s + and mr.docstatus = 1 and mr.status != "Stopped" and mr.company = %(company)s and mr_item.qty > ifnull(mr_item.ordered_qty,0) {0} {1} and (exists (select name from `tabBOM` bom where bom.item=mr_item.item_code and bom.is_active = 1)) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index b40549c5ba3..5afcd3150c0 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -681,3 +681,8 @@ erpnext.patches.v12_0.update_payment_entry_status erpnext.patches.v12_0.add_transporter_address_field #2020-10-27 erpnext.patches.v12_0.setup_einvoice_fields #2020-12-02 erpnext.patches.v12_0.add_state_code_for_ladakh +erpnext.patches.v12_0.create_taxable_value_field +erpnext.patches.v12_0.purchase_receipt_status +erpnext.patches.v12_0.add_company_link_to_einvoice_settings +erpnext.patches.v12_0.add_document_type_field_for_italy_einvoicing +erpnext.patches.v12_0.create_taxable_value_field_in_purchase_invoice diff --git a/erpnext/patches/v12_0/add_company_link_to_einvoice_settings.py b/erpnext/patches/v12_0/add_company_link_to_einvoice_settings.py new file mode 100644 index 00000000000..b6bd5fa311c --- /dev/null +++ b/erpnext/patches/v12_0/add_company_link_to_einvoice_settings.py @@ -0,0 +1,16 @@ +from __future__ import unicode_literals +import frappe + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'India'}) + if not company or not frappe.db.count('E Invoice User'): + return + + frappe.reload_doc("regional", "doctype", "e_invoice_user") + for creds in frappe.db.get_all('E Invoice User', fields=['name', 'gstin']): + company_name = frappe.db.sql(""" + select dl.link_name from `tabAddress` a, `tabDynamic Link` dl + where a.gstin = %s and dl.parent = a.name and dl.link_doctype = 'Company' + """, (creds.get('gstin'))) + if company_name and len(company_name) > 0: + frappe.db.set_value('E Invoice User', creds.get('name'), 'company', company_name[0][0]) \ No newline at end of file diff --git a/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py b/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py new file mode 100644 index 00000000000..4d649dd0f0c --- /dev/null +++ b/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py @@ -0,0 +1,18 @@ +from __future__ import unicode_literals +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields +import frappe + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'Italy'}) + if not company: + return + + custom_fields = { + 'Sales Invoice': [ + dict(fieldname='type_of_document', label='Type of Document', + fieldtype='Select', insert_after='customer_fiscal_code', + options='\nTD01\nTD02\nTD03\nTD04\nTD05\nTD06\nTD16\nTD17\nTD18\nTD19\nTD20\nTD21\nTD22\nTD23\nTD24\nTD25\nTD26\nTD27'), + ] + } + + create_custom_fields(custom_fields, update=True) \ No newline at end of file diff --git a/erpnext/patches/v12_0/create_taxable_value_field.py b/erpnext/patches/v12_0/create_taxable_value_field.py new file mode 100644 index 00000000000..a0c9fcf4cbe --- /dev/null +++ b/erpnext/patches/v12_0/create_taxable_value_field.py @@ -0,0 +1,18 @@ +from __future__ import unicode_literals +import frappe +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'India'}) + if not company: + return + + custom_fields = { + 'Sales Invoice Item': [ + dict(fieldname='taxable_value', label='Taxable Value', + fieldtype='Currency', insert_after='base_net_amount', hidden=1, options="Company:company:default_currency", + print_hide=1) + ] + } + + create_custom_fields(custom_fields, update=True) \ No newline at end of file diff --git a/erpnext/patches/v12_0/create_taxable_value_field_in_purchase_invoice.py b/erpnext/patches/v12_0/create_taxable_value_field_in_purchase_invoice.py new file mode 100644 index 00000000000..ed323bdd087 --- /dev/null +++ b/erpnext/patches/v12_0/create_taxable_value_field_in_purchase_invoice.py @@ -0,0 +1,18 @@ +from __future__ import unicode_literals +import frappe +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'India'}) + if not company: + return + + custom_fields = { + 'Purchase Invoice Item': [ + dict(fieldname='taxable_value', label='Taxable Value', + fieldtype='Currency', insert_after='base_net_amount', hidden=1, options="Company:company:default_currency", + print_hide=1) + ] + } + + create_custom_fields(custom_fields, update=True) \ No newline at end of file diff --git a/erpnext/patches/v12_0/purchase_receipt_status.py b/erpnext/patches/v12_0/purchase_receipt_status.py new file mode 100644 index 00000000000..62d2a726bb0 --- /dev/null +++ b/erpnext/patches/v12_0/purchase_receipt_status.py @@ -0,0 +1,24 @@ +""" This patch fixes old purchase receipts (PR) where even after submitting + the PR, the `status` remains "Draft". `per_billed` field was copied over from previous + doc (PO), hence it is recalculated for setting new correct status of PR. +""" + +import frappe + +def execute(): + affected_purchase_receipts = frappe.db.sql( + """select name from `tabPurchase Receipt` + where status = 'Draft' and per_billed = 100 and docstatus = 1""" + ) + + if not affected_purchase_receipts: + return + + + for pr in affected_purchase_receipts: + pr_name = pr[0] + + pr_doc = frappe.get_doc("Purchase Receipt", pr_name) + + pr_doc.update_billing_status(update_modified=False) + pr_doc.set_status(update=True, update_modified=False) diff --git a/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py b/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py index 24286dcebf9..6b1b601db19 100644 --- a/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py +++ b/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py @@ -43,4 +43,4 @@ def delete_duplicate_ledger_entries(duplicate_records_list): AND is_carry_forward = %s AND from_date = %s AND to_date = %s - ''', tuple(d)) \ No newline at end of file + ''', tuple(d)) diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index cf5c0fb400f..91437d37ff3 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -125,9 +125,6 @@ class Project(Document): if self.percent_complete == 100: self.status = "Completed" - else: - self.status = "Open" - def update_costing(self): from_time_sheet = frappe.db.sql("""select sum(costing_amount) as costing_amount, diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 0d403b193f3..75cd6219908 100755 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -30,6 +30,7 @@ class Task(NestedSet): def validate(self): self.validate_dates() + self.validate_parent_expected_end_date() self.validate_parent_project_dates() self.validate_progress() self.validate_status() @@ -44,6 +45,12 @@ class Task(NestedSet): frappe.throw(_("{0} can not be greater than {1}").format(frappe.bold("Actual Start Date"), \ frappe.bold("Actual End Date"))) + def validate_parent_expected_end_date(self): + if self.parent_task: + parent_exp_end_date = frappe.db.get_value("Task", self.parent_task, "exp_end_date") + if parent_exp_end_date and getdate(self.get("exp_end_date")) > getdate(parent_exp_end_date): + frappe.throw(_("Expected End Date should be less than or equal to parent task's Expected End Date {0}.").format(getdate(parent_exp_end_date))) + def validate_parent_project_dates(self): if not self.project or frappe.flags.in_test: return @@ -66,9 +73,6 @@ class Task(NestedSet): if (self.progress or 0) > 100: frappe.throw(_("Progress % for a task cannot be more than 100.")) - if self.progress == 100: - self.status = 'Completed' - if self.status == 'Completed': self.progress = 100 diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index ea16501b72f..ee61e9787af 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -3,6 +3,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ setup: function() { + frappe.flags.hide_serial_batch_dialog = true this._super(); frappe.ui.form.on(this.frm.doctype + " Item", "rate", function(frm, cdt, cdn) { var item = frappe.get_doc(cdt, cdn); @@ -634,28 +635,34 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ this.frm.trigger("item_code", cdt, cdn); } else { - var valid_serial_nos = []; - var serialnos = []; // Replacing all occurences of comma with carriage return item.serial_no = item.serial_no.replace(/,/g, '\n'); - serialnos = item.serial_no.split("\n"); - for (var i = 0; i < serialnos.length; i++) { - if (serialnos[i] != "") { - valid_serial_nos.push(serialnos[i]); - } - } item.conversion_factor = item.conversion_factor || 1; - refresh_field("serial_no", item.name, item.parentfield); - if(!doc.is_return && cint(user_defaults.set_qty_in_transactions_based_on_serial_no_input)) { - frappe.model.set_value(item.doctype, item.name, - "qty", valid_serial_nos.length / item.conversion_factor); - frappe.model.set_value(item.doctype, item.name, "stock_qty", valid_serial_nos.length); + if (!doc.is_return && cint(frappe.user_defaults.set_qty_in_transactions_based_on_serial_no_input)) { + setTimeout(() => { + me.update_qty(cdt, cdn); + }, 10000); } } } }, + update_qty: function(cdt, cdn) { + var valid_serial_nos = []; + var serialnos = []; + var item = frappe.get_doc(cdt, cdn); + serialnos = item.serial_no.split("\n"); + for (var i = 0; i < serialnos.length; i++) { + if (serialnos[i] != "") { + valid_serial_nos.push(serialnos[i]); + } + } + frappe.model.set_value(item.doctype, item.name, + "qty", valid_serial_nos.length / item.conversion_factor); + frappe.model.set_value(item.doctype, item.name, "stock_qty", valid_serial_nos.length); + }, + validate: function() { this.calculate_taxes_and_totals(false); }, diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index e8df13023c6..c827fca378f 100755 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -694,7 +694,7 @@ erpnext.utils.map_current_doc = function(opts) { } frappe.form.link_formatters['Item'] = function(value, doc) { - if (doc && value && doc.item_name && doc.item_name !== value) { + if (doc && value && doc.item_name && doc.item_name !== value && doc.item_code === value) { return value + ': ' + doc.item_name; } else if (!value && doc.doctype && doc.item_name) { // format blank value in child table diff --git a/erpnext/public/js/website_theme.js b/erpnext/public/js/website_theme.js index 84de2f5b515..0009cacf61e 100644 --- a/erpnext/public/js/website_theme.js +++ b/erpnext/public/js/website_theme.js @@ -4,7 +4,7 @@ frappe.ui.form.on('Website Theme', { validate(frm) { let theme_scss = frm.doc.theme_scss; - if (theme_scss.includes('frappe/public/scss/website') + if (theme_scss && theme_scss.includes('frappe/public/scss/website') && !theme_scss.includes('erpnext/public/scss/website') ) { frm.set_value('theme_scss', diff --git a/erpnext/regional/doctype/e_invoice_user/e_invoice_user.json b/erpnext/regional/doctype/e_invoice_user/e_invoice_user.json index dd9d99773a3..a65b1ca7ca8 100644 --- a/erpnext/regional/doctype/e_invoice_user/e_invoice_user.json +++ b/erpnext/regional/doctype/e_invoice_user/e_invoice_user.json @@ -5,6 +5,7 @@ "editable_grid": 1, "engine": "InnoDB", "field_order": [ + "company", "gstin", "username", "password" @@ -30,12 +31,20 @@ "in_list_view": 1, "label": "Password", "reqd": 1 + }, + { + "fieldname": "company", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Company", + "options": "Company", + "reqd": 1 } ], "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2020-12-22 15:10:53.466205", + "modified": "2021-03-22 12:16:56.365616", "modified_by": "Administrator", "module": "Regional", "name": "E Invoice User", diff --git a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html index 888b2da48eb..369a4001ef6 100644 --- a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html +++ b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.html @@ -109,7 +109,7 @@