Merge pull request #1 from williamjmorenor/ni_ni_chart_of_account

ni_ni_chart_template.json 

* Fix missing Comma (,)
* Change Style => TITLE to Title
* Rearrange accounts to improve readability
* Best IFRS for SMES compatibility
* Best accounts tax details
* Validate JSON
* Add root_type and account_type
diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/ni_ni_chart_template.json b/erpnext/accounts/doctype/account/chart_of_accounts/ni_ni_chart_template.json
index c35cc13..54474d3 100644
--- a/erpnext/accounts/doctype/account/chart_of_accounts/ni_ni_chart_template.json
+++ b/erpnext/accounts/doctype/account/chart_of_accounts/ni_ni_chart_template.json
@@ -1,73 +1,130 @@
 {
     "country_code": "ni",
     "name": "Catalogo de Cuentas",
-	"is_active": "Yes",
+    "is_active": "Yes",
     "tree": {
-        "ACTIVO": {
-            "ACTIVO CORRIENTE": {
-                "INVENTARIOS": {
-                    "Productos Disponibles para la Venta": {},
-                    "Materia Prima": {},
-                    "Produccion en Proceso": {},
-                    "Producto Terminado": {},
-                    "Mercaderia en Transito": {},
-                    "Mercaderia de Reventa": {},
-                    "Productos en Proceso": {}
+        "Activo": {
+            "Activo Corriente": {
+                "Efectivo en Caja y Bancos": {
+                    "Caja": {
+                        "Caja General Moneda Nacional": {
+                            "root_type": "Cash"
+                        },
+                        "Caja General Moneda Extrangera": {
+                            "root_type": "Cash"
+                        },
+                        "Caja Chica Moneda Nacional": {
+                            "root_type": "Cash"
+                        },
+                        "Caja Chica Moneda Extrangera": {
+                            "root_type": "Cash"
+                        },
+                        "Fondos por Depositar": {
+                            "root_type": "Cash"
+                        }
+                    },
+                    "Cuentas Bancarias": {
+                        "Cuenta Corriente Moneda Nacional": {
+                            "root_type": "Bank"
+                        },
+                        "Cuenta Corriente Moneda Extrangera": {
+                            "root_type": "Bank"
+                        }
+                    },
+                    "Otros Equivalentes a Efectivo": {}
                 },
-                "ACTIVOS FINANCIEROS": {
+                "Activos Financieros Realizables a Corto Plazo": {
                     "Inversiones a Corto Plazo": {},
                     "Bonos y Acciones Disponibles para la Venta": {},
-                    "Certificados Bancarios": {}
+                    "Certificados Bancarios": {},
+                    "Otros Valores Negociables a Corto Plazo": {}
                 },
-                "CUENTAS Y DOCUMENTOS POR COBRAR A CLIENTES": {
-                    "Cuentas por Cobrar Moneda Nacional": {},
-                    "Cuentas por Cobrar Moneda Extrangera": {},
-                    "Documentos por Cobrar Moneda Nacional": {},
-                    "Documentos por Cobrar Moneda Extrangera": {},
-                    "Cuentas por Cobrar por Exportaciones": {},
+                "Cuentas y Documentos por Cobrar a Clientes": {
+                    "Cuentas por Cobrar Moneda Nacional": {
+                        "account_type": "Receivable"
+                    },
+                    "Cuentas por Cobrar Moneda Extrangera": {
+                        "account_type": "Receivable"
+                    },
+                    "Documentos por Cobrar Moneda Nacional": {
+                        "account_type": "Receivable"
+                    },
+                    "Documentos por Cobrar Moneda Extrangera": {
+                        "account_type": "Receivable"
+                    },
+                    "Cuentas por Cobrar por Exportaciones": {
+                        "account_type": "Receivable"
+                    },
                     "Estimacion para Cuentas Incobrables": {}
                 },
-                "IMPUESTOS ACREDITABLES": {
-                    "Impuesto a Valor Agregado Acreditable": {},
+                "Inventarios": {
+                    "Productos Disponibles para la Venta": {
+                        "root_type": "Warehouse"
+                    },
+                    "Materia Prima": {
+                        "root_type": "Stock"
+                    },
+                    "Produccion en Proceso": {
+                        "root_type": "Stock"
+                    },
+                    "Producto Terminado": {
+                        "root_type": "Stock"
+                    },
+                    "Mercaderia en Transito": {},
+                    "Mercaderia de Reventa": {},
+                    "Productos en Proceso": {},
+                    "Materiales y Suministros": {},
+                    "Deterioro de Valor de Inventarios": {},
+                    "Provicion por Obsolecencia de Inventaios": {}
+                },
+                "Impuestos Acreditables": {
+                    "Impuesto a Valor Agregado Acreditable": {
+                        "IVA Acreditable por Compra de Bienes": {
+                            "account_type": "Tax"
+                        },
+                        "IVA Acreditable por Importaciones": {
+                            "account_type": "Tax"
+                        },
+                        "IVA Acreditable por Prestacion de Servicios": {
+                            "account_type": "Tax"
+                        },
+                        "Acreditacion Proporcional": {}
+                    },
                     "Anticipos de IR o Pago Minimo Definitivo": {},
-                    "Impuestos diferidos": {},
-                    "Retenciones a Cuenta de IR Acreditables": {},
+                    "Retenciones a Cuenta de IR Acreditables": {
+                        "Retencion por V/Bienes o P/Servicios 2%": {
+                            "account_type": "Tax"
+                        },
+                        "Retencion Operaciones Targeta Debito/Credito 1.5%": {
+                            "account_type": "Tax"
+                        }
+                    },
                     "Retenciones a Cuenta de IMI Acreditables": {},
                     "Retenciones Definitivas Sobre Rentas o Ganancias de Capital": {}
                 },
-                "EFECTIVO EN CAJA Y BANCOS": {
-                    "Caja Moneda Nacional": {},
-                    "Caja Moneda Extrangera": {},
-                    "Caja Chica Moneda Extranjera": {},
-                    "Caja Chica Moneda Nacional": {},
-                    "Cuentas Bancarias Moneda Nacional": {},
-                    "Cuentas Bancarias Moneda Extrangera": {}
-                },
-                "INVERSIONES TEMPORARIAS": {
-                    "Bonos": {},
-                    "Acciones": {},
-                    "Valores Publicos": {}
-                },
-                "OTRAS CUENTAS POR COBRAR": {
+                "Otras Cuentas por Cobrar": {
                     "Anticipos a Proveedores": {},
                     "Anticipos por Justificar": {},
+                    "Accionistas": {},
+                    "Funcionarios y Empleados": {},
                     "Faltantes en Caja por Justificar": {},
                     "Adelantos a Trabajos": {},
                     "Reclamos por Cobrar": {},
                     "Depositos en Garantia": {},
                     "Faltantes de Inventario por Justificar": {},
-                    "Anticipos a Proveedores": {},
-                    "Anticipos a Proveedores": {},
                     "Casa Matriz": {},
                     "Sucursales": {},
                     "Empresas Controladoras": {},
                     "Empresas Controladas": {},
-                    "Depositos en Garantia": {},
                     "Pagos adelantados": {},
+                    "Gastos Pagados por Adelantados": {},
+                    "Adelantos de Salarios": {},
+                    "Papeleria y Utiles": {},
+                    "Materiales de Oficina": {},
                     "Otras Cuentas por Cobrar": {}
                 }
             },
-            "ACTIVO NO CORRIENTE": {
+            "Activo no Corriente": {
                 "Propiedad Planta y Equipo": {
                     "Terrenos": {},
                     "Edificios": {},
@@ -80,158 +137,296 @@
                     "Otra Bienes Mobiliarios": {},
                     "Depresiacion Acumulada": {}
                 },
-                "INVERSIONES EN ASOCIADAS": {
-					"Inversiones Permanentes": {},
-					"Negocios Conjuntos": {}
+                "Inversiones Permanentes": {
+                    "Inversiones Permanentes": {},
+                    "Negocios Conjuntos": {}
                 },
-                "ACTIVOS INTANGILES": {
+                "Bienes en Arrendamiento Financiero": {
+                    "Locales y Edificios en Arrendamiento": {},
+                    "Equipos y Maquinaria en Arrendamiento": {}
+                },
+                "Activos Intangibles": {
                     "Patentes": {},
                     "Marcas Registradas": {},
                     "Derechos de Autor": {},
                     "Concesiones": {},
                     "Licencias": {},
                     "Gastos de investigacion": {},
-                    "Amortizacion de Activos Intangibles": {}
+                    "Amortizacion de Activos Intangibles": {},
+                    "Deterioro de Valor de Activos Intangibles": {}
                 },
-                "AMORTIZABLES": {
+                "Amortizables": {
                     "Gastos de Consitucion": {},
                     "Gastos Pre Operativos": {},
-                    "Mejoras en Bienes Arrendados": {}
+                    "Mejoras en Bienes Arrendados": {},
+                    "Amortizacion de Activos Amortizables": {},
+                    "Deterioro de Valaor de Activos Amortizables": {}
                 },
-                "CUENTAS POR COBRAR A LARGO PLAZO": {
+                "Cuentas por Cobrar a Largo Plazo": {
                     "Creditos a Largo Plazo": {}
                 },
-                "INVERSIONES A LARGO PLAZO": {
+                "Inversiones a Largo Plazo": {
                     "Depositos Bancarios a Plazo": {},
                     "Intereses percibidos por adelantado": {},
                     "Titulos y Acciones": {}
-                }
+                },
+                "Activo por Impuestos Diferidos": {}
             },
             "root_type": "Asset"
         },
-        "INGRESOS": {
-            "VENTAS": {
+        "Ingresos": {
+            "Ventas": {
                 "Venta de Bienes o Prestacion de Servicios Grabados": {},
                 "Venta de Bienes o Prestacion de Servicios Exentos": {},
                 "Venta de Bienes o Prestacion de Servicios Exonerados": {},
-                "Venta por Exportaciones": {}
+                "Venta por Exportaciones": {},
+                "root_type": "Income Account"
             },
-            "OTROS INGRESOS GRABALES": {},
-            "INGRESOS NO GRABALES": {},
-            "root_type": "Income"
+            "Otros Ingresos Grabables": {
+                "Ganacia Cambiaria": {},
+                "Sobrante en Arqueo de Caja": {},
+                "Otros Ingresos Grabables": {},
+                "root_type": "Income Account"
+            },
+            "Ingresos no Grabables": {
+                "Ingreso por Rentas y Ganacias de Capital sujetas a Retencion Definitiva": {},
+                "Interes Bancarios": {},
+                "Otros Ingresos no Grabables": {},
+                "root_type": "Income Account"
+            },
+            "root_type": "Income Account"
         },
-        "PASIVO": {
-            "PASIVO CORRIENTE": {
-                "CUENTAS POR PAGAR A PROVEEDORES": {
-                    "Cuentas por Pagar Moneda Nacional": {},
-                    "Cuentas por Pagar Moneda Extrangera": {},
-                    "Documentos por Pagar Moneda Nacional": {},
-                    "Documentos por Pagar Moneda Extrangera": {},
-                    "Proveedores por Importaciones": {}
+        "Pasivo": {
+            "PasivoCorriente": {
+                "CuentasporPagarProveedores": {
+                    "CuentasporPagarMonedaNacional": {
+                        "account_type": "Payable"
+                    },
+                    "CuentasporPagarMonedaExtrangera": {
+                        "account_type": "Payable"
+                    },
+                    "DocumentosporPagarMonedaNacional": {
+                        "account_type": "Payable"
+                    },
+                    "DocumentosporPagarMonedaExtrangera": {
+                        "account_type": "Payable"
+                    },
+                    "CuentasporPagarporImportaciones": {
+                        "account_type": "Payable"
+                    }
                 },
-                "ANTICIPOS DE CLIENTES": {},
-                "DEUDAS FINANCIERAS": {
-                    "Prestamos por Pagar a Corto Plazo": {},
-                    "Otras Deudas Bancarios": {}
+                "AnticiposdeClientes": {},
+                "PasivosFinancierosaCortoPlazo": {
+                    "PrestamosporPagaraCortoPlazo": {},
+                    "SobregirosBancarios": {},
+                    "OtrasDeudasBancarios": {}
                 },
-                "GASTOS POR PAGAR": {
-                    "Servicios Basicos": {},
-                    "Prestaciones Sociales": {},
-                    "Salarios por Pagar": {}
+                "GastosporPagar": {
+                    "ServiciosBasicos": {},
+                    "PrestacionesSociales": {},
+                    "SalariosporPagar": {}
                 },
-                "PROVISIONES POR PAGAR": {
-                    "Pasivos Laborales": {},
-                    "Reclamos por Pagar": {},
-                    "Responsabilidad frente a terceros": {}
+                "ProvisionesporPagar": {
+                    "PasivosLaborales": {
+                        "IndemnizacionLaboral": {},
+                        "AguinaldoporPagar": {}
+                    },
+                    "ReclamosporPagar": {},
+                    "Responsabilidadfrenteaterceros": {}
                 },
-                "IMPUESTOS POR PAGAR": {
-                    "Impuesto al Valor Agregado por Pagar": {},
-                    "Impuesto sobre la Renta": {},
-                    "Impuestos Municipales": {}
+                "ImpuestosporPagar": {
+                    "ImpuestoalValorAgregadoporPagar": {
+                        "account_type": "Tax"
+                    },
+                    "ImpuestosobrelaRenta": {
+                        "account_type": "Tax"
+                    },
+                    "ImpuestosMunicipales": {
+                        "account_type": "Tax"
+                    }
                 },
-                "RETENCIONES POR PAGAR": {
-                    "Rentas del Trabajo": {},
-                    "Rentas de Actividades Economicas": {},
-                    "Rentas y Ganancias de Capital": {}
+                "RetencionesporPagar": {
+                    "RentasdelTrabajo": {
+                        "RetencionRentasdelTrabajoTarifaProgresiva": {
+                            "account_type": "Tax"
+                        },
+                        "RetencionDefinitivaporRentadelTrabajo": {
+                            "account_type": "Tax"
+                        }
+                    },
+                    "RentasdeActividadesEconomicas": {
+                        "Retencion2%porC/BienesoP/Servicios": {
+                            "account_type": "Tax"
+                        },
+                        "Retencion10%ServiciosProfesionales": {
+                            "account_type": "Tax"
+                        },
+                        "Retencion3%compraBienesAgropecuarios": {
+                            "account_type": "Tax"
+                        },
+                        "Retencion5%compraMaderaenRollo": {
+                            "account_type": "Tax"
+                        },
+                        "OtrasRetenciones10%": {
+                            "account_type": "Tax"
+                        }
+                    },
+                    "RentasyGananciasdeCapital": {
+                        "RetencionDefintiva10%porRentasdeCapital": {
+                            "account_type": "Tax"
+                        },
+                        "RetencionDefinitiva5%porRentasdeCapital": {
+                            "account_type": "Tax"
+                        },
+                        "RetencionDefinitiva10%porGananciadeCapital": {
+                            "account_type": "Tax"
+                        },
+                        "RetencionDefinitivaActividadesEconomicasNoResidentes": {
+                            "account_type": "Tax"
+                        },
+                        "RetencionDefinitivaTransaccionesBursatiles": {
+                            "account_type": "Tax"
+                        },
+                        "RetencionesDefintiva5%FondosdeInversion": {
+                            "account_type": "Tax"
+                        }
+                    },
+                    "Retencion17%OperacionesconParaisosFiscales": {
+                        "account_type": "Tax"
+                    }
                 },
-                "OTRAS CUENTAS POR PAGAR": {}
+                "OtrasCuentasporPagar": {}
             },
-            "PASIVO NO CORRIENTE": {
-                "PRESTAMOS A LARGO PLAZO": {},
-                "DEUDAS COMERCIALES": {},
-                "DEUDAS DIVERSAS": {},
-                "DEUDAS FINANCIERAS": {}
+            "PasivonoCorriente": {
+                "PrestamosaLargoPlazo": {},
+                "CuentasporPagaraLargoPlaso": {},
+                "OtrasCuentasporPagaraLargoPlazo": {},
+                "OtrosPasivosFinancierosaLargoPlaso": {}
             },
+            "ObligacionesporArrendamientoFinancieroaLargoPlazo": {},
+            "PasivoporImpuestosDiferidos": {},
             "root_type": "Liability"
         },
-        "PATRIMONIO": {
-            "APORTE DE PROPIETARIOS/SOCIOS": {
-                "APORTES A CAPITALIZAR": {},
-                "CAPITAL": {
-                    "Capital Social": {
+        "Patrimonio": {
+            "AportedeSocios": {
+                "Capital": {
+                    "CapitalSocialPagado": {
+                        "account_type": "Equity"
+                    },
+                    "CapitalSocialnoPagado": {
                         "account_type": "Equity"
                     }
                 }
             },
-            "DONACIONES": {},
-            "GANANCIAS RETENIDAS": {
-                "RESERVAS": {
-                    "Reservas Legales": {
+            "Donaciones": {},
+            "GananciasAcumuladas": {
+                "Reservas": {
+                    "ReservasLegales": {
                         "account_type": "Equity"
                     },
-                    "Reservas Voluntarias": {
+                    "ReservasVoluntarias": {
                         "account_type": "Equity"
                     }
                 },
-                "RESULTADOS ACUMULADOS": {
-                     "Resultados Acumulados": {
+                "Resultados": {
+                    "ResultadosAcumulados": {
                         "account_type": "Equity"
-                    }
-                    "Resultados del ejercicio": {
+                    },
+                    "AjustesaPeriodosAnteriores": {
+                        "account_type": "Equity"
+                    },
+                    "Resultadosdelejercicio": {
                         "account_type": "Equity"
                     }
                 }
             },
             "root_type": "Asset"
         },
-        "COSTOS Y GASTOS": {
-            "COSTO DE VENTA": {
-                "Costo de Bienes": {},
-                "Costo de Servicios": {}
+        "CostosyGastos": {
+            "CostodeVenta": {
+                "CostodeBienes": {},
+                "CostodeServicios": {},
+                "CostodeProduccion": {
+                    "ManodeObraDirecta": {},
+                    "MaterialesDirectos": {},
+                    "CostosIndirectosdeFrabicacion": {},
+                    "root_type": "ExpenseAccount"
+                },
+                "root_type": "ExpenseAccount"
             },
-            "GASTOS DE VENTAS": {
+            "GastosdeVentas": {
                 "Publicidad": {},
+                "Mercadeo": {},
+                "MuestrasGratis": {},
+                "RegalosaClientes": {},
                 "Fletes": {},
-                "Promociones": {}
+                "Promociones": {},
+                "root_type": "ExpenseAccount"
             },
-            "GASTOS DE ADMINISTRACION": {
+            "GastosdeAdministracion": {
                 "Alquileres": {},
                 "Combustible": {},
-                "Servicios Basicos": {},
+                "ServiciosBasicos": {
+                    "EnergiaElectrica": {},
+                    "AguaPotable": {},
+                    "Internet": {},
+                    "TelefonoFijo": {},
+                    "Celular": {},
+                    "CostosporServiciosWEB": {},
+                    "root_type": "ExpenseAccount"
+                },
                 "Vigilancia": {},
-                "Gastos Varios (def)": {},
-                "Mantenimiento y Reparaciones": {},
+                "GastosVarios": {},
+                "MantenimientoyReparaciones": {},
                 "Papeleria": {},
                 "Representacion": {},
                 "Amortizaciones": {},
                 "Inatec": {},
-                "Seguros": {}
+                "Indemnizacion": {},
+                "FletesyCorreos": {},
+                "CuentasIncobrables": {},
+                "CapacitacionalPersonal": {},
+                "Uniformes": {},
+                "Seguros": {},
+                "Donaciones": {},
+                "ImpuestoMunicipal": {},
+                "Matricula": {},
+                "RecolecciondeBasura": {},
+                "IVAProporcionalnoAcreditado": {},
+                "AyudaaEmpleados": {},
+                "root_type": "ExpenseAccount"
             },
-             "GASTOS POR SERVICIOS PROFESIONALES Y TECNICOS": {
-                "Servicios Profesionales": {},
-                "Servivios Tecnicos": {},
-                "Consultorias": {}
+            "GastosporServiciosProfesionalesyTecnicos": {
+                "ServiciosProfesionales": {},
+                "ServiviosTecnicos": {},
+                "Consultorias": {},
+                "root_type": "ExpenseAccount"
             },
-            "GASTOS POR SALARIOS Y OTRAS COMPESACIONES": {},
-            "GASTOS POR SEGURIDAD SOCIAL": {},
-            "GASTOS POR DEPRECIACION": {},
-            "GASTOS POR FINANCIAMIENTO NACIONAL": {},
-            "GASTOS POR FINANCIAMIENTO INTERNACIONAL": {},
-            "OTROS GASTOS": {},
-            "COSTOS Y GASTOS NO DEDUCIBLES": {},
-            "RENTAS Y GANACIAS DE CAPITAL": {},
-            "IMPUESTO SOBRE LA RENTA": {},
-            "root_type": "Expense"
+            "GastosporSalariosyOtrasCompensaciones": {},
+            "GastoporSeguridadSocial": {},
+            "GastoporDepreciacion": {},
+            "GastosporFinanciamientoNacional": {},
+            "GastoporFinanciemientoInternacional": {},
+            "OtrosGastos": {
+                "PerdidaCambiario": {},
+                "PerdidaenVentadeActivoFijo": {},
+                "Sinientros": {},
+                "OtrosGastosFinancieros": {},
+                "CertificaciondeChequesyChequeras": {},
+                "OtrosGastos": {},
+                "root_type": "ExpenseAccount"
+            },
+            "CostosyGastosNoDeducibles": {
+                "Multas": {},
+                "Recargos": {},
+                "RetencionesAsumidas": {},
+                "IVAnoTrasladado": {},
+                "DeteriorodeActivos": {},
+                "root_type": "ExpenseAccount"
+            },
+            "ImpuestoporRentasyGananciasdeCapital": {},
+            "ImpuestosobrelaRentadeActivividadesEconomicas": {},
+            "root_type": "ExpenseAccount"
         }
     }
 }