diff --git a/erpnext/__init__.py b/erpnext/__init__.py index ff08a726b3c..ce9731e6ba9 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.1.4' +__version__ = '12.1.5' def get_default_company(user=None): '''Get default company for user''' diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/el_salvador_standard.json b/erpnext/accounts/doctype/account/chart_of_accounts/verified/el_salvador_standard.json new file mode 100644 index 00000000000..6409d95e639 --- /dev/null +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/el_salvador_standard.json @@ -0,0 +1,809 @@ +{ + "country_code": "sv", + "name": "El Salvador Standard", + "tree": { + "100000 - ACTIVOS - xmC": { + "11000000 - ACTIVOS CORRIENTES - xmC": { + "11010000 - EFECTIVO Y EQUIVALENTES AL EFECTIVO - xmC": { + "11010100 - Caja general - xmC": { + "account_number": "11010100", + "account_type": "Cash" + }, + "Caja chica": { + "account_number": "11010200", + "account_type": "Cash", + "is_group": 1 + }, + "Efectivo en bancos": { + "account_number": "11010300", + "account_type": "Bank", + "is_group": 1 + }, + "account_number": "11010000", + "account_type": "Cash" + }, + "CUENTAS POR COBRAR ARRENDAMIENTOS FINANCIEROS": { + "Arrendamientos financieros por cobrar": { + "account_number": "11040100", + "is_group": 1 + }, + "Estimaci\u00f3n para cuentas de cobro dudoso (CR)": { + "account_number": "11040200", + "is_group": 1 + }, + "account_number": "11040000" + }, + "DEUDORES COMERCIALES Y OTRAS CUENTAS POR COBRAR": { + "11030100 - Deudores comerciales - xmC": { + "account_number": "11030100", + "account_type": "Receivable" + }, + "Estimaci\u00f3n para cuentas de cobro dudoso (CR)": { + "account_number": "11030200", + "account_type": "Receivable", + "is_group": 1 + }, + "Otras cuentas por cobrar no comerciales": { + "account_number": "11030300", + "account_type": "Receivable", + "is_group": 1 + }, + "account_number": "11030000", + "account_type": "Receivable" + }, + "GASTOS PAGADOS POR ANTICIPADO": { + "Adelantos a empleados": { + "account_number": "110904", + "account_type": "Temporary", + "is_group": 1 + }, + "Papeler\u00eda y \u00fatiles en existencia": { + "account_number": "11090300", + "account_type": "Temporary", + "is_group": 1 + }, + "Primas de seguros aun no vendidas": { + "account_number": "11090100", + "account_type": "Temporary", + "is_group": 1 + }, + "Rentas aun no corridas por los inmuebles": { + "account_number": "11090200", + "account_type": "Temporary", + "is_group": 1 + }, + "account_number": "11090000", + "account_type": "Temporary" + }, + "INVENTARIOS": { + "11050100 - Inventarios en bodega al costo - xmC": { + "account_number": "11050100", + "account_type": "Stock" + }, + "11050300 - Pedidos en transito - xmC": { + "account_number": "11050300", + "account_type": "Stock Received But Not Billed" + }, + "Estimaci\u00f3n para obsolescencia de inventarios o de lento movimiento (CR)": { + "account_number": "11050200", + "account_type": "Stock", + "is_group": 1 + }, + "Mercader\u00edas en consignaci\u00f3n": { + "account_number": "11050400", + "account_type": "Stock", + "is_group": 1 + }, + "account_number": "11050000", + "account_type": "Stock" + }, + "INVERSIONES TEMPORALES": { + "Acciones": { + "account_number": "11020100", + "account_type": "Temporary", + "is_group": 1 + }, + "Bonos": { + "account_number": "11020200", + "account_type": "Temporary", + "is_group": 1 + }, + "C\u00e9dulas hipotecarias": { + "account_number": "11020300", + "account_type": "Temporary", + "is_group": 1 + }, + "account_number": "11020000", + "account_type": "Temporary" + }, + "IVA CREDITO FISCAL": { + "IVA compras locales": { + "account_number": "11060100", + "account_type": "Tax", + "is_group": 1, + "tax_rate": 13.0 + }, + "IVA importaciones": { + "account_number": "11060200", + "account_type": "Tax", + "is_group": 1, + "tax_rate": 13.0 + }, + "account_number": "11060000", + "account_type": "Tax", + "tax_rate": 13.0 + }, + "IVA PERCIBIDO": { + "account_number": "IVA PERCIBIDO", + "account_type": "Tax", + "is_group": 1, + "tax_rate": 1.0 + }, + "IVA RETENIDO": { + "account_number": "11070000", + "account_type": "Tax", + "is_group": 1, + "tax_rate": 1.0 + }, + "account_number": "11000000" + }, + "12000000 - ACTIVOS NO CORRIENTES - xmC": { + "ACTIVOS INTANGIBLES": { + "Concesiones y franquicias": { + "account_number": "12080300", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Derechos de llave": { + "account_number": "12080100", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Patentes y marcas de fabrica": { + "account_number": "12080200", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Software": { + "account_number": "12080400", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "account_number": "12080000", + "account_type": "Fixed Asset" + }, + "CUENTAS POR COBRAR ARRENDAMIENTOS FINANCIEROS A LARGO PLAZO": { + "Arrendamientos financieros por cobrar a largo plazo": { + "account_number": "12060100", + "account_type": "Receivable", + "is_group": 1 + }, + "Estimaci\u00f3n para cuentas de cobro dudoso a largo plazo (CR)": { + "account_number": "12060200", + "account_type": "Receivable", + "is_group": 1 + }, + "account_number": "12060000", + "account_type": "Receivable" + }, + "DEPRECIACION ACUMULUDA (CR)": { + "12030100 - Deprec. acumulada de propiedades, planta y equipo propio al costo - xmC": { + "account_number": "12030100", + "account_type": "Accumulated Depreciation" + }, + "Deprec. acumulada de prop., planta y equipo bajo arrend. Financiero": { + "account_number": "12030200", + "account_type": "Accumulated Depreciation", + "is_group": 1 + }, + "Deprec. acumulada de revaluaos de propiedades, planta y equipo": { + "account_number": "12030300", + "account_type": "Accumulated Depreciation", + "is_group": 1 + }, + "account_number": "12030000", + "account_type": "Accumulated Depreciation" + }, + "DEUDORES COMERCIALES Y OTRAS CUENTAS POR COBRAR A LARGO PLAZO": { + "12050100 - Deudores comerciales a largo plazo - xmC": { + "account_number": "12050100", + "account_type": "Receivable", + "is_group": 1 + }, + "Cuentas por cobrar no comerciales a largo plazo": { + "account_number": "12050300", + "account_type": "Receivable", + "is_group": 1 + }, + "Estimaci\u00f3n para cuentas de cobro dudoso a largo plazo (CR)": { + "account_number": "12050200", + "account_type": "Receivable", + "is_group": 1 + }, + "account_number": "12050000", + "account_type": "Receivable" + }, + "IMPUESTO SOBRE LA RENTA DIFERIDO-ACTIVO": { + "12070200 - Pago anticipados de impuestos sobre la renta - xmC": { + "account_number": "12070200", + "account_type": "Temporary", + "is_group": 1 + }, + "Cr\u00e9dito impuestos sobre la renta de a\u00f1os anteriores": { + "account_number": "12070100", + "account_type": "Tax", + "is_group": 1 + }, + "account_number": "12070000", + "account_type": "Tax" + }, + "INVERSIONES PERMANENTES": { + "Inversiones en asociadas": { + "account_number": "12040200", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Inversiones en negocios conjuntos": { + "account_number": "12040300", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Inversiones en subsidiarias": { + "account_number": "12040100", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "account_number": "12040000", + "account_type": "Fixed Asset" + }, + "PROPIEDADES, PLANTA Y EQUIPO": { + "12010300 - Maquinarias y equipos - xmC": { + "account_number": "12010300", + "account_type": "Fixed Asset" + }, + "Edificios": { + "account_number": "12010200", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Mobiliario y equipo": { + "account_number": "12010400", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Terrenos": { + "account_number": "12010100", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Veh\u00edculos": { + "account_number": "12010500", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "account_number": "12010000", + "account_type": "Fixed Asset" + }, + "REVALUACIONES DE PROPIEDADES, PLANTA Y EQUIPO": { + "Revaluaci\u00f3n de edificios": { + "account_number": "12020200", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Revaluaci\u00f3n de maquinarias y equipo": { + "account_number": "12020300", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Revaluaci\u00f3n de mobiliario y equipo": { + "account_number": "12020400", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Revaluaci\u00f3n de terrenos": { + "account_number": "12020100", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "Revaluaci\u00f3n de veh\u00edculos": { + "account_number": "12020500", + "account_type": "Fixed Asset", + "is_group": 1 + }, + "account_number": "12020000", + "account_type": "Fixed Asset" + }, + "account_number": "12000000", + "account_type": "Fixed Asset" + }, + "account_number": "100000", + "root_type": "Asset" + }, + "20000000 - PASIVOS - xmC": { + "PASIVOS CORRIENTES": { + "ACREEDORES COMERCIALES Y OTRAS CUENTAS POR PAGAR": { + "21020100 - Cuentas por pagar comerciales - xmC": { + "account_number": "21020100", + "account_type": "Payable" + }, + "Documentos por pagar comerciales": { + "account_number": "21020200", + "account_type": "Payable", + "is_group": 1 + }, + "account_number": "21020000", + "account_type": "Payable" + }, + "BENEFICIOS A EMPLEADOS POR PAGAR": { + "Beneficios a corto plazo por pagar": { + "account_number": "21050100", + "account_type": "Payable", + "is_group": 1 + }, + "Beneficios post empleo por pagar": { + "account_number": "21050200", + "account_type": "Payable", + "is_group": 1 + }, + "account_number": "21050000", + "account_type": "Payable" + }, + "DIVIDENDOS POR PAGAR": { + "account_number": "21080000", + "account_type": "Payable", + "is_group": 1 + }, + "IMPUESTO SOBRE LA RENTA CORRIENTE POR PAGAR": { + "account_number": "21070000", + "account_type": "Tax", + "is_group": 1 + }, + "IVA DEBITOS FISCALES": { + "Por ventas a consumidores": { + "account_number": "21060200", + "account_type": "Tax", + "is_group": 1 + }, + "Por ventas a contribuyentes": { + "account_number": "21060100", + "account_type": "Tax", + "is_group": 1 + }, + "account_number": "21060000", + "account_type": "Tax" + }, + "OBLIGACIONES BAJO ARRENDAMIENTOS FINANCIEROS PORCION CORRIENTE": { + "Contratos bajo arrendamientos financieros": { + "account_number": "21030100", + "account_type": "Payable", + "is_group": 1 + }, + "account_number": "21030000", + "account_type": "Payable" + }, + "OTROS ACREEDORES, RETENCIONES Y DESCUENTOS": { + "Cuentas por pagar a accionistas": { + "account_number": "21040400", + "account_type": "Payable", + "is_group": 1 + }, + "Descuentos": { + "account_number": "21040300", + "account_type": "Payable", + "is_group": 1 + }, + "Otros acreedores": { + "account_number": "21040100", + "account_type": "Payable", + "is_group": 1 + }, + "Retenciones": { + "account_number": "21040200", + "account_type": "Payable", + "is_group": 1 + }, + "account_number": "21040000", + "account_type": "Payable" + }, + "PRESTAMOS Y SOBREGIROS BANCARIOS": { + "Porci\u00f3n corriente de prestamos bancarios a largo plazo": { + "account_number": "21010300", + "is_group": 1 + }, + "Prestamos bancarios a corto plazo": { + "account_number": "21010100", + "is_group": 1 + }, + "Sobregiros bancarios": { + "account_number": "21010200", + "is_group": 1 + }, + "account_number": "21010000" + }, + "account_number": "21000000" + }, + "PASIVOS NO CORRIENTES": { + "ANTICIPOS Y GARANTIAS DE CLIENTES": { + "Anticipos de clientes": { + "account_number": "22040100", + "account_type": "Temporary", + "is_group": 1 + }, + "Garant\u00edas de clientes": { + "account_number": "22040200", + "account_type": "Temporary", + "is_group": 1 + }, + "account_number": "22040000", + "account_type": "Temporary" + }, + "INTERES MINOTARIO": { + "Inter\u00e9s de accionista minotarios": { + "account_number": "22050100", + "is_group": 1 + }, + "account_number": "22050000" + }, + "OBLIGACIONES BAJO ARRENDAMIENTOS FINANCIEROS A LARGO PLAZO": { + "Contratos bajo arrendamientos financieros": { + "account_number": "22030100", + "is_group": 1 + }, + "account_number": "22030000" + }, + "OTROS PRESTAMOS A LARGO PLAZO": { + "account_number": "22020000", + "is_group": 1 + }, + "PRESTAMOS BANCARIOS A LARGO PLAZO": { + "account_number": "22010000", + "is_group": 1 + }, + "account_number": "22000000" + }, + "PROVISIONES": { + "IMPUESTOS SOBRE LA RENTA COMPLEMENTARIO": { + "Ejercicios anteriores": { + "account_number": "23010100", + "account_type": "Tax", + "is_group": 1 + }, + "account_number": "23010000", + "account_type": "Tax" + }, + "PROVISION PARA OBLIGACIONES LABORALES": { + "Indemnizaci\u00f3n": { + "account_number": "23020100", + "is_group": 1 + }, + "account_number": "23020000" + }, + "account_number": "23000000" + }, + "account_number": "20000000", + "root_type": "Liability" + }, + "30000000 - PATRIMONIO - xmC": { + "CAPITAL, RESERVAS Y RESULTADOS": { + "CAPITAL SOCIAL": { + "Capital Social M\u00ednimo": { + "Capital Social M\u00ednimo NO Pagado": { + "account_number": "31010102", + "account_type": "Equity", + "is_group": 1 + }, + "Capital Social M\u00ednimo Suscrito": { + "account_number": "31010101", + "account_type": "Equity", + "is_group": 1 + }, + "account_number": "31010100", + "account_type": "Equity" + }, + "Capital Social Variable": { + "Capital Social Variable NO Pagado": { + "account_number": "31010202", + "account_type": "Equity", + "is_group": 1 + }, + "Capital Social Variable Suscrito": { + "account_number": "31010201", + "account_type": "Equity", + "is_group": 1 + }, + "account_number": "31010200", + "account_type": "Equity" + }, + "account_number": "31010000", + "account_type": "Equity" + }, + "DIVIDENDOS PAGADOS": { + "account_number": "31060000", + "account_type": "Equity", + "is_group": 1 + }, + "GANANCIAS NO DISTRIBUIDAS": { + "De ejercicios anteriores": { + "account_number": "31020100", + "account_type": "Equity", + "is_group": 1 + }, + "Del presente ejercicio": { + "account_number": "31020200", + "account_type": "Equity", + "is_group": 1 + }, + "account_number": "31020000", + "account_type": "Equity" + }, + "GANANCIAS RESTRINGIDAS": { + "Reserva legal": { + "account_number": "31030100", + "account_type": "Equity", + "is_group": 1 + }, + "account_number": "31030000", + "account_type": "Equity" + }, + "PERDIDAS ACUMULADAS (CR)": { + "De ejercicios anteriores": { + "account_number": "31050100", + "account_type": "Equity", + "is_group": 1 + }, + "Del presente ejercicio": { + "account_number": "31050200", + "account_type": "Equity", + "is_group": 1 + }, + "account_number": "31050000", + "account_type": "Equity" + }, + "SUPERAVIT POR REVALUACIONES": { + "Super\u00e1vit por revaluaci\u00f3n de activos": { + "account_number": "31040100", + "account_type": "Equity", + "is_group": 1 + }, + "account_number": "31040000", + "account_type": "Equity" + }, + "account_number": "31000000", + "account_type": "Equity" + }, + "account_number": "30000000", + "root_type": "Equity" + }, + "40000000 - CUENTAS DE RESULTADO DEUDORAS - xmC": { + "COSTOS Y GASTOS DE OPERACI\u00d3N": { + "41010000 - COSTO DE LAS VENTAS - xmC": { + "account_number": "41010000", + "account_type": "Cost of Goods Sold" + }, + "GASTOS DE DEPARTAMENTO DE OPERACIONES": { + "41020600 - Depreciaciones y amortizaciones - xmC": { + "account_number": "41020600", + "account_type": "Depreciation" + }, + "41020900 - Redondeos - xmC": { + "account_number": "41020900", + "account_type": "Round Off" + }, + "Gastos operativos": { + "account_number": "41020700", + "account_type": "Chargeable", + "is_group": 1 + }, + "Mantenimientos": { + "account_number": "41020400", + "account_type": "Chargeable", + "is_group": 1 + }, + "Materiales y suministros": { + "Ajustes de Inventario": { + "account_number": "41020201", + "account_type": "Stock Adjustment" + }, + "account_number": "41020200", + "account_type": "Chargeable" + }, + "Seguros": { + "account_number": "41020500", + "account_type": "Chargeable", + "is_group": 1 + }, + "Servicios b\u00e1sicos": { + "account_number": "41020300", + "account_type": "Chargeable", + "is_group": 1 + }, + "Servicios y honorarios profesionales": { + "account_number": "41020800", + "account_type": "Chargeable", + "is_group": 1 + }, + "Sueldos y prestaciones laborales": { + "account_number": "41020100", + "account_type": "Chargeable", + "is_group": 1 + }, + "account_number": "41020000", + "account_type": "Expense Account" + }, + "GASTOS DE VENTAS Y DISTRIBUCION": { + "Depreciaciones y amortizaciones": { + "account_number": "41030600", + "account_type": "Chargeable", + "is_group": 1 + }, + "Gastos operativos": { + "account_number": "41030700", + "account_type": "Chargeable", + "is_group": 1 + }, + "Mantenimientos": { + "account_number": "41030400", + "account_type": "Chargeable", + "is_group": 1 + }, + "Materiales y suministros": { + "account_number": "41030200", + "account_type": "Chargeable", + "is_group": 1 + }, + "Seguros": { + "account_number": "41030500", + "account_type": "Chargeable", + "is_group": 1 + }, + "Servicios b\u00e1sicos": { + "account_number": "41030300", + "account_type": "Chargeable", + "is_group": 1 + }, + "Servicios y honorarios profesionales": { + "account_number": "41030800", + "account_type": "Chargeable", + "is_group": 1 + }, + "Sueldos y prestaciones laborales": { + "account_number": "41030100", + "account_type": "Chargeable", + "is_group": 1 + }, + "account_number": "41030000", + "account_type": "Expense Account" + }, + "account_number": "41000000", + "account_type": "Expense Account" + }, + "GASTOS DE IMPUESTO SOBRE LA RENTA": { + "GASTOS DE IMPUESTO SOBRE LA RENTA CORRIENTE": { + "account_number": "43010000", + "account_type": "Expense Account", + "is_group": 1 + }, + "account_number": "43000000", + "account_type": "Expense Account" + }, + "GASTOS DE NO OPERACI\u00d3N": { + "42020000 - GASTOS NO DEDUCIBLES - xmC": { + "Garant\u00eda por venta de productos": { + "account_number": "42020200", + "account_type": "Expense Account", + "is_group": 1 + }, + "Impuesto sobre la renta complementario": { + "account_number": "42020100", + "account_type": "Tax", + "is_group": 1 + }, + "account_number": "42020000", + "account_type": "Expense Account" + }, + "GASTOS FINANCIEROS": { + "42010100 - Intereses - xmC": { + "account_number": "42010100", + "account_type": "Expense Account", + "is_group": 1 + }, + "42010300 - Diferenciales cambiarios - xmC": { + "account_number": "42010300", + "account_type": "Expense Account", + "is_group": 1 + }, + "Comisiones bancarias": { + "account_number": "42010200", + "account_type": "Expense Account", + "is_group": 1 + }, + "account_number": "42010000", + "account_type": "Expense Account" + }, + "account_number": "42000000", + "account_type": "Expense Account" + }, + "account_number": "40000000", + "root_type": "Expense" + }, + "50000000 - CUENTAS DE RESULTADO ACREEDORAS - xmC": { + "INGRESOS DE NO OPERACI\u00d3N": { + "DIVIDENDOS GANADOS": { + "Dividendos devengados por inversiones": { + "account_number": "52020100", + "account_type": "Income Account", + "is_group": 1 + }, + "account_number": "52020000", + "account_type": "Income Account" + }, + "INGRESOS FINANCIEROS": { + "Comisiones": { + "account_number": "52010200", + "account_type": "Income Account", + "is_group": 1 + }, + "Diferenciales cambiarios": { + "account_number": "52010300", + "account_type": "Income Account", + "is_group": 1 + }, + "Intereses": { + "account_number": "52010100", + "account_type": "Income Account", + "is_group": 1 + }, + "account_number": "52010000", + "account_type": "Income Account" + }, + "OTROS INGRESOS": { + "Ingresos por activos dados en arrendamientos financieros": { + "account_number": "52030200", + "account_type": "Income Account", + "is_group": 1 + }, + "Ingresos por conversi\u00f3n": { + "account_number": "52030100", + "account_type": "Income Account", + "is_group": 1 + }, + "Reintegros de seguros": { + "account_number": "52030300", + "account_type": "Income Account", + "is_group": 1 + }, + "account_number": "52030000", + "account_type": "Income Account" + }, + "account_number": "52000000", + "account_type": "Income Account" + }, + "INGRESOS POR OPERACIONES CONTINUAS": { + "51010000 - VENTAS DE BIENES - xmC": { + "account_number": "51010000", + "account_type": "Income Account" + }, + "VENTAS DE SERVICIOS": { + "account_number": "51020000", + "account_type": "Income Account", + "is_group": 1 + }, + "account_number": "51000000", + "account_type": "Income Account" + }, + "account_number": "50000000", + "root_type": "Income" + }, + "60000000 - CUENTA LIQUIDADORA DE RESULTADOS - xmC": { + "CUENTA DE CIERRE": { + "PERDIDAS Y GANANCIAS": { + "account_number": "61010000", + "is_group": 1 + }, + "account_number": "61000000" + }, + "account_number": "60000000", + "root_type": "Income" + } + } +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index eb75d0d2846..e25942ca34d 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -827,10 +827,10 @@ def get_opening_accounts(company): accounts = frappe.db.sql_list("""select name from tabAccount where - is_group=0 and report_type='Balance Sheet' and company=%s and - name not in(select distinct account from tabWarehouse where + is_group=0 and report_type='Balance Sheet' and company={0} and + name not in (select distinct account from tabWarehouse where account is not null and account != '') - order by name asc""", frappe.db.escape(company)) + order by name asc""".format(frappe.db.escape(company))) return [{"account": a, "balance": get_balance_on(a)} for a in accounts] diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json index 73c4bc14c31..6fe18115c04 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.json @@ -1,1349 +1,1352 @@ { - "allow_import": 1, - "autoname": "naming_series:", - "creation": "2013-05-21 16:16:39", - "doctype": "DocType", - "document_type": "Document", - "field_order": [ - "title", - "naming_series", - "supplier", - "supplier_name", - "tax_id", - "due_date", - "is_paid", - "is_return", - "apply_tds", - "column_break1", - "company", - "posting_date", - "posting_time", - "set_posting_time", - "amended_from", - "accounting_dimensions_section", - "cost_center", - "dimension_col_break", - "sb_14", - "on_hold", - "release_date", - "cb_17", - "hold_comment", - "supplier_invoice_details", - "bill_no", - "column_break_15", - "bill_date", - "returns", - "return_against", - "section_addresses", - "supplier_address", - "address_display", - "contact_person", - "contact_display", - "contact_mobile", - "contact_email", - "col_break_address", - "shipping_address", - "shipping_address_display", - "currency_and_price_list", - "currency", - "conversion_rate", - "column_break2", - "buying_price_list", - "price_list_currency", - "plc_conversion_rate", - "ignore_pricing_rule", - "sec_warehouse", - "set_warehouse", - "rejected_warehouse", - "col_break_warehouse", - "is_subcontracted", - "supplier_warehouse", - "items_section", - "update_stock", - "scan_barcode", - "items", - "pricing_rule_details", - "pricing_rules", - "raw_materials_supplied", - "supplied_items", - "section_break_26", - "total_qty", - "base_total", - "base_net_total", - "column_break_28", - "total", - "net_total", - "total_net_weight", - "taxes_section", - "tax_category", - "column_break_49", - "shipping_rule", - "section_break_51", - "taxes_and_charges", - "taxes", - "sec_tax_breakup", - "other_charges_calculation", - "totals", - "base_taxes_and_charges_added", - "base_taxes_and_charges_deducted", - "base_total_taxes_and_charges", - "column_break_40", - "taxes_and_charges_added", - "taxes_and_charges_deducted", - "total_taxes_and_charges", - "section_break_44", - "apply_discount_on", - "base_discount_amount", - "column_break_46", - "additional_discount_percentage", - "discount_amount", - "section_break_49", - "base_grand_total", - "base_rounding_adjustment", - "base_rounded_total", - "base_in_words", - "column_break8", - "grand_total", - "rounding_adjustment", - "rounded_total", - "in_words", - "total_advance", - "outstanding_amount", - "disable_rounded_total", - "payments_section", - "mode_of_payment", - "cash_bank_account", - "clearance_date", - "col_br_payments", - "paid_amount", - "base_paid_amount", - "write_off", - "write_off_amount", - "base_write_off_amount", - "column_break_61", - "write_off_account", - "write_off_cost_center", - "advances_section", - "allocate_advances_automatically", - "get_advances", - "advances", - "payment_schedule_section", - "payment_terms_template", - "payment_schedule", - "terms_section_break", - "tc_name", - "terms", - "printing_settings", - "letter_head", - "group_same_items", - "column_break_112", - "select_print_heading", - "language", - "more_info", - "credit_to", - "party_account_currency", - "is_opening", - "against_expense_account", - "column_break_63", - "status", - "inter_company_invoice_reference", - "remarks", - "subscription_section", - "from_date", - "to_date", - "column_break_114", - "auto_repeat", - "update_auto_repeat_reference" - ], - "fields": [ - { - "allow_on_submit": 1, - "default": "{supplier_name}", - "fieldname": "title", - "fieldtype": "Data", - "hidden": 1, - "label": "Title", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "naming_series", - "fieldtype": "Select", - "label": "Series", - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "ACC-PINV-.YYYY.-", - "print_hide": 1, - "reqd": 1, - "set_only_once": 1 - }, - { - "fieldname": "supplier", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Supplier", - "oldfieldname": "supplier", - "oldfieldtype": "Link", - "options": "Supplier", - "print_hide": 1, - "search_index": 1 - }, - { - "bold": 1, - "depends_on": "supplier", - "fetch_from": "supplier.supplier_name", - "fieldname": "supplier_name", - "fieldtype": "Data", - "in_global_search": 1, - "label": "Supplier Name", - "oldfieldname": "supplier_name", - "oldfieldtype": "Data", - "read_only": 1 - }, - { - "fetch_from": "supplier.tax_id", - "fieldname": "tax_id", - "fieldtype": "Read Only", - "label": "Tax Id", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "due_date", - "fieldtype": "Date", - "label": "Due Date", - "oldfieldname": "due_date", - "oldfieldtype": "Date" - }, - { - "default": "0", - "fieldname": "is_paid", - "fieldtype": "Check", - "label": "Is Paid", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "is_return", - "fieldtype": "Check", - "label": "Is Return (Debit Note)", - "no_copy": 1, - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "apply_tds", - "fieldtype": "Check", - "label": "Apply Tax Withholding Amount", - "print_hide": 1 - }, - { - "fieldname": "column_break1", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "width": "50%" - }, - { - "fieldname": "company", - "fieldtype": "Link", - "in_standard_filter": 1, - "label": "Company", - "options": "Company", - "print_hide": 1, - "remember_last_selected_value": 1 - }, - { - "fieldname": "cost_center", - "fieldtype": "Link", - "label": "Cost Center", - "options": "Cost Center" - }, - { - "default": "Today", - "fieldname": "posting_date", - "fieldtype": "Date", - "in_list_view": 1, - "label": "Date", - "oldfieldname": "posting_date", - "oldfieldtype": "Date", - "print_hide": 1, - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "posting_time", - "fieldtype": "Time", - "label": "Posting Time", - "no_copy": 1, - "print_hide": 1, - "print_width": "100px", - "width": "100px" - }, - { - "default": "0", - "depends_on": "eval:doc.docstatus==0", - "fieldname": "set_posting_time", - "fieldtype": "Check", - "label": "Edit Posting Date and Time", - "print_hide": 1 - }, - { - "fieldname": "amended_from", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Amended From", - "no_copy": 1, - "oldfieldname": "amended_from", - "oldfieldtype": "Link", - "options": "Purchase Invoice", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:doc.on_hold", - "fieldname": "sb_14", - "fieldtype": "Section Break", - "label": "Hold Invoice" - }, - { - "default": "0", - "fieldname": "on_hold", - "fieldtype": "Check", - "label": "Hold Invoice" - }, - { - "depends_on": "eval:doc.on_hold", - "description": "Once set, this invoice will be on hold till the set date", - "fieldname": "release_date", - "fieldtype": "Date", - "label": "Release Date" - }, - { - "fieldname": "cb_17", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval:doc.on_hold", - "fieldname": "hold_comment", - "fieldtype": "Small Text", - "label": "Reason For Putting On Hold" - }, - { - "collapsible": 1, - "collapsible_depends_on": "bill_no", - "fieldname": "supplier_invoice_details", - "fieldtype": "Section Break", - "label": "Supplier Invoice Details" - }, - { - "fieldname": "bill_no", - "fieldtype": "Data", - "label": "Supplier Invoice No", - "oldfieldname": "bill_no", - "oldfieldtype": "Data", - "print_hide": 1 - }, - { - "fieldname": "column_break_15", - "fieldtype": "Column Break" - }, - { - "fieldname": "bill_date", - "fieldtype": "Date", - "label": "Supplier Invoice Date", - "oldfieldname": "bill_date", - "oldfieldtype": "Date", - "print_hide": 1 - }, - { - "depends_on": "return_against", - "fieldname": "returns", - "fieldtype": "Section Break", - "label": "Returns" - }, - { - "depends_on": "return_against", - "fieldname": "return_against", - "fieldtype": "Link", - "label": "Return Against Purchase Invoice", - "no_copy": 1, - "options": "Purchase Invoice", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "section_addresses", - "fieldtype": "Section Break", - "label": "Address and Contact" - }, - { - "fieldname": "supplier_address", - "fieldtype": "Link", - "label": "Select Supplier Address", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "address_display", - "fieldtype": "Small Text", - "label": "Address", - "read_only": 1 - }, - { - "fieldname": "contact_person", - "fieldtype": "Link", - "in_global_search": 1, - "label": "Contact Person", - "options": "Contact", - "print_hide": 1 - }, - { - "fieldname": "contact_display", - "fieldtype": "Small Text", - "label": "Contact", - "read_only": 1 - }, - { - "fieldname": "contact_mobile", - "fieldtype": "Small Text", - "label": "Mobile No", - "read_only": 1 - }, - { - "fieldname": "contact_email", - "fieldtype": "Small Text", - "label": "Contact Email", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "col_break_address", - "fieldtype": "Column Break" - }, - { - "fieldname": "shipping_address", - "fieldtype": "Link", - "label": "Select Shipping Address", - "options": "Address", - "print_hide": 1 - }, - { - "fieldname": "shipping_address_display", - "fieldtype": "Small Text", - "label": "Shipping Address", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "currency_and_price_list", - "fieldtype": "Section Break", - "label": "Currency and Price List", - "options": "fa fa-tag" - }, - { - "fieldname": "currency", - "fieldtype": "Link", - "label": "Currency", - "oldfieldname": "currency", - "oldfieldtype": "Select", - "options": "Currency", - "print_hide": 1 - }, - { - "fieldname": "conversion_rate", - "fieldtype": "Float", - "label": "Exchange Rate", - "oldfieldname": "conversion_rate", - "oldfieldtype": "Currency", - "precision": "9", - "print_hide": 1 - }, - { - "fieldname": "column_break2", - "fieldtype": "Column Break" - }, - { - "fieldname": "buying_price_list", - "fieldtype": "Link", - "label": "Price List", - "options": "Price List", - "print_hide": 1 - }, - { - "fieldname": "price_list_currency", - "fieldtype": "Link", - "label": "Price List Currency", - "options": "Currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "plc_conversion_rate", - "fieldtype": "Float", - "label": "Price List Exchange Rate", - "precision": "9", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "ignore_pricing_rule", - "fieldtype": "Check", - "label": "Ignore Pricing Rule", - "no_copy": 1, - "permlevel": 1, - "print_hide": 1 - }, - { - "fieldname": "sec_warehouse", - "fieldtype": "Section Break" - }, - { - "depends_on": "update_stock", - "fieldname": "set_warehouse", - "fieldtype": "Link", - "label": "Set Accepted Warehouse", - "options": "Warehouse", - "print_hide": 1 - }, - { - "depends_on": "update_stock", - "description": "Warehouse where you are maintaining stock of rejected items", - "fieldname": "rejected_warehouse", - "fieldtype": "Link", - "label": "Rejected Warehouse", - "no_copy": 1, - "options": "Warehouse", - "print_hide": 1 - }, - { - "fieldname": "col_break_warehouse", - "fieldtype": "Column Break" - }, - { - "default": "No", - "fieldname": "is_subcontracted", - "fieldtype": "Select", - "label": "Raw Materials Supplied", - "options": "No\nYes", - "print_hide": 1 - }, - { - "depends_on": "eval:doc.is_subcontracted==\"Yes\"", - "fieldname": "supplier_warehouse", - "fieldtype": "Link", - "label": "Supplier Warehouse", - "no_copy": 1, - "options": "Warehouse", - "print_hide": 1, - "print_width": "50px", - "width": "50px" - }, - { - "fieldname": "items_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart" - }, - { - "default": "0", - "fieldname": "update_stock", - "fieldtype": "Check", - "label": "Update Stock", - "print_hide": 1 - }, - { - "fieldname": "scan_barcode", - "fieldtype": "Data", - "label": "Scan Barcode" - }, - { - "allow_bulk_edit": 1, - "fieldname": "items", - "fieldtype": "Table", - "label": "Items", - "oldfieldname": "entries", - "oldfieldtype": "Table", - "options": "Purchase Invoice Item", - "reqd": 1 - }, - { - "fieldname": "pricing_rule_details", - "fieldtype": "Section Break", - "label": "Pricing Rules" - }, - { - "fieldname": "pricing_rules", - "fieldtype": "Table", - "label": "Pricing Rule Detail", - "options": "Pricing Rule Detail", - "read_only": 1 - }, - { - "collapsible_depends_on": "supplied_items", - "fieldname": "raw_materials_supplied", - "fieldtype": "Section Break", - "label": "Raw Materials Supplied" - }, - { - "fieldname": "supplied_items", - "fieldtype": "Table", - "label": "Supplied Items", - "options": "Purchase Receipt Item Supplied", - "read_only": 1 - }, - { - "fieldname": "section_break_26", - "fieldtype": "Section Break" - }, - { - "fieldname": "total_qty", - "fieldtype": "Float", - "label": "Total Quantity", - "read_only": 1 - }, - { - "fieldname": "base_total", - "fieldtype": "Currency", - "label": "Total (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_net_total", - "fieldtype": "Currency", - "label": "Net Total (Company Currency)", - "oldfieldname": "net_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_28", - "fieldtype": "Column Break" - }, - { - "fieldname": "total", - "fieldtype": "Currency", - "label": "Total", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "net_total", - "fieldtype": "Currency", - "label": "Net Total", - "oldfieldname": "net_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_net_weight", - "fieldtype": "Float", - "label": "Total Net Weight", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "taxes_section", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-money" - }, - { - "fieldname": "tax_category", - "fieldtype": "Link", - "label": "Tax Category", - "options": "Tax Category", - "print_hide": 1 - }, - { - "fieldname": "column_break_49", - "fieldtype": "Column Break" - }, - { - "fieldname": "shipping_rule", - "fieldtype": "Link", - "label": "Shipping Rule", - "options": "Shipping Rule", - "print_hide": 1 - }, - { - "fieldname": "section_break_51", - "fieldtype": "Section Break" - }, - { - "fieldname": "taxes_and_charges", - "fieldtype": "Link", - "label": "Purchase Taxes and Charges Template", - "oldfieldname": "purchase_other_charges", - "oldfieldtype": "Link", - "options": "Purchase Taxes and Charges Template", - "print_hide": 1 - }, - { - "fieldname": "taxes", - "fieldtype": "Table", - "label": "Purchase Taxes and Charges", - "oldfieldname": "purchase_tax_details", - "oldfieldtype": "Table", - "options": "Purchase Taxes and Charges" - }, - { - "collapsible": 1, - "fieldname": "sec_tax_breakup", - "fieldtype": "Section Break", - "label": "Tax Breakup" - }, - { - "fieldname": "other_charges_calculation", - "fieldtype": "Text", - "label": "Taxes and Charges Calculation", - "no_copy": 1, - "oldfieldtype": "HTML", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "totals", - "fieldtype": "Section Break", - "oldfieldtype": "Section Break", - "options": "fa fa-money" - }, - { - "fieldname": "base_taxes_and_charges_added", - "fieldtype": "Currency", - "label": "Taxes and Charges Added (Company Currency)", - "oldfieldname": "other_charges_added", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_taxes_and_charges_deducted", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted (Company Currency)", - "oldfieldname": "other_charges_deducted", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges (Company Currency)", - "oldfieldname": "total_tax", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_40", - "fieldtype": "Column Break" - }, - { - "fieldname": "taxes_and_charges_added", - "fieldtype": "Currency", - "label": "Taxes and Charges Added", - "oldfieldname": "other_charges_added_import", - "oldfieldtype": "Currency", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "taxes_and_charges_deducted", - "fieldtype": "Currency", - "label": "Taxes and Charges Deducted", - "oldfieldname": "other_charges_deducted_import", - "oldfieldtype": "Currency", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_taxes_and_charges", - "fieldtype": "Currency", - "label": "Total Taxes and Charges", - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "discount_amount", - "fieldname": "section_break_44", - "fieldtype": "Section Break", - "label": "Additional Discount" - }, - { - "default": "Grand Total", - "fieldname": "apply_discount_on", - "fieldtype": "Select", - "label": "Apply Additional Discount On", - "options": "\nGrand Total\nNet Total", - "print_hide": 1 - }, - { - "fieldname": "base_discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount (Company Currency)", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_46", - "fieldtype": "Column Break" - }, - { - "fieldname": "additional_discount_percentage", - "fieldtype": "Float", - "label": "Additional Discount Percentage", - "print_hide": 1 - }, - { - "fieldname": "discount_amount", - "fieldtype": "Currency", - "label": "Additional Discount Amount", - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "section_break_49", - "fieldtype": "Section Break" - }, - { - "fieldname": "base_grand_total", - "fieldtype": "Currency", - "label": "Grand Total (Company Currency)", - "oldfieldname": "grand_total", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "eval:!doc.disable_rounded_total", - "fieldname": "base_rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "base_in_words", - "fieldtype": "Data", - "label": "In Words (Company Currency)", - "oldfieldname": "in_words", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break8", - "fieldtype": "Column Break", - "oldfieldtype": "Column Break", - "print_hide": 1, - "width": "50%" - }, - { - "fieldname": "grand_total", - "fieldtype": "Currency", - "in_list_view": 1, - "label": "Grand Total", - "oldfieldname": "grand_total_import", - "oldfieldtype": "Currency", - "options": "currency", - "read_only": 1 - }, - { - "fieldname": "rounding_adjustment", - "fieldtype": "Currency", - "label": "Rounding Adjustment", - "no_copy": 1, - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "depends_on": "eval:!doc.disable_rounded_total", - "fieldname": "rounded_total", - "fieldtype": "Currency", - "label": "Rounded Total", - "no_copy": 1, - "options": "currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "in_words", - "fieldtype": "Data", - "label": "In Words", - "oldfieldname": "in_words_import", - "oldfieldtype": "Data", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "total_advance", - "fieldtype": "Currency", - "label": "Total Advance", - "no_copy": 1, - "oldfieldname": "total_advance", - "oldfieldtype": "Currency", - "options": "party_account_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "outstanding_amount", - "fieldtype": "Currency", - "label": "Outstanding Amount", - "no_copy": 1, - "oldfieldname": "outstanding_amount", - "oldfieldtype": "Currency", - "options": "party_account_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "0", - "depends_on": "grand_total", - "fieldname": "disable_rounded_total", - "fieldtype": "Check", - "label": "Disable Rounded Total" - }, - { - "collapsible": 1, - "collapsible_depends_on": "paid_amount", - "depends_on": "eval:doc.is_paid===1||(doc.advances && doc.advances.length>0)", - "fieldname": "payments_section", - "fieldtype": "Section Break", - "label": "Payments" - }, - { - "fieldname": "mode_of_payment", - "fieldtype": "Link", - "label": "Mode of Payment", - "options": "Mode of Payment", - "print_hide": 1 - }, - { - "fieldname": "cash_bank_account", - "fieldtype": "Link", - "label": "Cash/Bank Account", - "options": "Account" - }, - { - "fieldname": "clearance_date", - "fieldtype": "Date", - "hidden": 1, - "label": "Clearance Date" - }, - { - "fieldname": "col_br_payments", - "fieldtype": "Column Break" - }, - { - "depends_on": "is_paid", - "fieldname": "paid_amount", - "fieldtype": "Currency", - "label": "Paid Amount", - "no_copy": 1, - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "base_paid_amount", - "fieldtype": "Currency", - "label": "Paid Amount (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "write_off_amount", - "depends_on": "grand_total", - "fieldname": "write_off", - "fieldtype": "Section Break", - "label": "Write Off" - }, - { - "fieldname": "write_off_amount", - "fieldtype": "Currency", - "label": "Write Off Amount", - "no_copy": 1, - "options": "currency", - "print_hide": 1 - }, - { - "fieldname": "base_write_off_amount", - "fieldtype": "Currency", - "label": "Write Off Amount (Company Currency)", - "no_copy": 1, - "options": "Company:company:default_currency", - "print_hide": 1, - "read_only": 1 - }, - { - "fieldname": "column_break_61", - "fieldtype": "Column Break" - }, - { - "depends_on": "eval:flt(doc.write_off_amount)!=0", - "fieldname": "write_off_account", - "fieldtype": "Link", - "label": "Write Off Account", - "options": "Account", - "print_hide": 1 - }, - { - "depends_on": "eval:flt(doc.write_off_amount)!=0", - "fieldname": "write_off_cost_center", - "fieldtype": "Link", - "label": "Write Off Cost Center", - "options": "Cost Center", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "advances", - "fieldname": "advances_section", - "fieldtype": "Section Break", - "label": "Advance Payments", - "oldfieldtype": "Section Break", - "options": "fa fa-money", - "print_hide": 1 - }, - { - "default": "0", - "fieldname": "allocate_advances_automatically", - "fieldtype": "Check", - "label": "Set Advances and Allocate (FIFO)" - }, - { - "depends_on": "eval:!doc.allocate_advances_automatically", - "fieldname": "get_advances", - "fieldtype": "Button", - "label": "Get Advances Paid", - "oldfieldtype": "Button", - "print_hide": 1 - }, - { - "fieldname": "advances", - "fieldtype": "Table", - "label": "Advances", - "no_copy": 1, - "oldfieldname": "advance_allocation_details", - "oldfieldtype": "Table", - "options": "Purchase Invoice Advance", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "eval:(!doc.is_return)", - "fieldname": "payment_schedule_section", - "fieldtype": "Section Break", - "label": "Payment Terms" - }, - { - "fieldname": "payment_terms_template", - "fieldtype": "Link", - "label": "Payment Terms Template", - "options": "Payment Terms Template" - }, - { - "fieldname": "payment_schedule", - "fieldtype": "Table", - "label": "Payment Schedule", - "no_copy": 1, - "options": "Payment Schedule", - "print_hide": 1 - }, - { - "collapsible": 1, - "collapsible_depends_on": "terms", - "fieldname": "terms_section_break", - "fieldtype": "Section Break", - "label": "Terms and Conditions", - "options": "fa fa-legal" - }, - { - "fieldname": "tc_name", - "fieldtype": "Link", - "label": "Terms", - "options": "Terms and Conditions", - "print_hide": 1 - }, - { - "fieldname": "terms", - "fieldtype": "Text Editor", - "label": "Terms and Conditions1" - }, - { - "collapsible": 1, - "fieldname": "printing_settings", - "fieldtype": "Section Break", - "label": "Printing Settings" - }, - { - "allow_on_submit": 1, - "fieldname": "letter_head", - "fieldtype": "Link", - "label": "Letter Head", - "options": "Letter Head", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "default": "0", - "fieldname": "group_same_items", - "fieldtype": "Check", - "label": "Group same items", - "print_hide": 1 - }, - { - "fieldname": "column_break_112", - "fieldtype": "Column Break" - }, - { - "allow_on_submit": 1, - "fieldname": "select_print_heading", - "fieldtype": "Link", - "label": "Print Heading", - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "print_hide": 1, - "report_hide": 1 - }, - { - "fieldname": "language", - "fieldtype": "Data", - "label": "Print Language", - "read_only": 1 - }, - { - "collapsible": 1, - "fieldname": "more_info", - "fieldtype": "Section Break", - "label": "More Information", - "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "print_hide": 1 - }, - { - "fieldname": "credit_to", - "fieldtype": "Link", - "label": "Credit To", - "oldfieldname": "credit_to", - "oldfieldtype": "Link", - "options": "Account", - "print_hide": 1, - "reqd": 1, - "search_index": 1 - }, - { - "fieldname": "party_account_currency", - "fieldtype": "Link", - "hidden": 1, - "label": "Party Account Currency", - "no_copy": 1, - "options": "Currency", - "print_hide": 1, - "read_only": 1 - }, - { - "default": "No", - "fieldname": "is_opening", - "fieldtype": "Select", - "label": "Is Opening", - "oldfieldname": "is_opening", - "oldfieldtype": "Select", - "options": "No\nYes", - "print_hide": 1 - }, - { - "fieldname": "against_expense_account", - "fieldtype": "Small Text", - "hidden": 1, - "label": "Against Expense Account", - "no_copy": 1, - "oldfieldname": "against_expense_account", - "oldfieldtype": "Small Text", - "print_hide": 1 - }, - { - "fieldname": "column_break_63", - "fieldtype": "Column Break" - }, - { - "default": "Draft", - "fieldname": "status", - "fieldtype": "Select", - "in_standard_filter": 1, - "label": "Status", - "options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nUnpaid\nOverdue\nCancelled" - }, - { - "fieldname": "inter_company_invoice_reference", - "fieldtype": "Link", - "label": "Inter Company Invoice Reference", - "options": "Sales Invoice", - "read_only": 1 - }, - { - "fieldname": "remarks", - "fieldtype": "Small Text", - "label": "Remarks", - "no_copy": 1, - "oldfieldname": "remarks", - "oldfieldtype": "Text", - "print_hide": 1 - }, - { - "fieldname": "subscription_section", - "fieldtype": "Section Break", - "label": "Subscription Section", - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "description": "Start date of current invoice's period", - "fieldname": "from_date", - "fieldtype": "Date", - "label": "From Date", - "no_copy": 1, - "print_hide": 1 - }, - { - "allow_on_submit": 1, - "description": "End date of current invoice's period", - "fieldname": "to_date", - "fieldtype": "Date", - "label": "To Date", - "no_copy": 1, - "print_hide": 1 - }, - { - "fieldname": "column_break_114", - "fieldtype": "Column Break" - }, - { - "fieldname": "auto_repeat", - "fieldtype": "Link", - "label": "Auto Repeat", - "no_copy": 1, - "options": "Auto Repeat", - "print_hide": 1, - "read_only": 1 - }, - { - "allow_on_submit": 1, - "depends_on": "eval: doc.auto_repeat", - "fieldname": "update_auto_repeat_reference", - "fieldtype": "Button", - "label": "Update Auto Repeat Reference" - }, - { - "collapsible": 1, - "fieldname": "accounting_dimensions_section", - "fieldtype": "Section Break", - "label": "Accounting Dimensions " - }, - { - "fieldname": "dimension_col_break", - "fieldtype": "Column Break" - } - ], - "icon": "fa fa-file-text", - "idx": 204, - "is_submittable": 1, - "modified": "2019-06-18 22:04:28.889159", - "modified_by": "Administrator", - "module": "Accounts", - "name": "Purchase Invoice", - "name_case": "Title Case", - "owner": "Administrator", - "permissions": [ - { - "amend": 1, - "cancel": 1, - "create": 1, - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Accounts User", - "share": 1, - "submit": 1, - "write": 1 - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase User" - }, - { - "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 - }, - { - "email": 1, - "print": 1, - "read": 1, - "report": 1, - "role": "Auditor" - }, - { - "permlevel": 1, - "read": 1, - "role": "Accounts Manager", - "write": 1 - } - ], - "search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "supplier", - "title_field": "title", - "track_changes": 1 - } \ No newline at end of file + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2013-05-21 16:16:39", + "doctype": "DocType", + "document_type": "Document", + "engine": "InnoDB", + "field_order": [ + "title", + "naming_series", + "supplier", + "supplier_name", + "tax_id", + "due_date", + "is_paid", + "is_return", + "apply_tds", + "column_break1", + "company", + "posting_date", + "posting_time", + "set_posting_time", + "amended_from", + "accounting_dimensions_section", + "cost_center", + "dimension_col_break", + "sb_14", + "on_hold", + "release_date", + "cb_17", + "hold_comment", + "supplier_invoice_details", + "bill_no", + "column_break_15", + "bill_date", + "returns", + "return_against", + "section_addresses", + "supplier_address", + "address_display", + "contact_person", + "contact_display", + "contact_mobile", + "contact_email", + "col_break_address", + "shipping_address", + "shipping_address_display", + "currency_and_price_list", + "currency", + "conversion_rate", + "column_break2", + "buying_price_list", + "price_list_currency", + "plc_conversion_rate", + "ignore_pricing_rule", + "sec_warehouse", + "set_warehouse", + "rejected_warehouse", + "col_break_warehouse", + "is_subcontracted", + "supplier_warehouse", + "items_section", + "update_stock", + "scan_barcode", + "items", + "pricing_rule_details", + "pricing_rules", + "raw_materials_supplied", + "supplied_items", + "section_break_26", + "total_qty", + "base_total", + "base_net_total", + "column_break_28", + "total", + "net_total", + "total_net_weight", + "taxes_section", + "tax_category", + "column_break_49", + "shipping_rule", + "section_break_51", + "taxes_and_charges", + "taxes", + "sec_tax_breakup", + "other_charges_calculation", + "totals", + "base_taxes_and_charges_added", + "base_taxes_and_charges_deducted", + "base_total_taxes_and_charges", + "column_break_40", + "taxes_and_charges_added", + "taxes_and_charges_deducted", + "total_taxes_and_charges", + "section_break_44", + "apply_discount_on", + "base_discount_amount", + "column_break_46", + "additional_discount_percentage", + "discount_amount", + "section_break_49", + "base_grand_total", + "base_rounding_adjustment", + "base_rounded_total", + "base_in_words", + "column_break8", + "grand_total", + "rounding_adjustment", + "rounded_total", + "in_words", + "total_advance", + "outstanding_amount", + "disable_rounded_total", + "payments_section", + "mode_of_payment", + "cash_bank_account", + "clearance_date", + "col_br_payments", + "paid_amount", + "base_paid_amount", + "write_off", + "write_off_amount", + "base_write_off_amount", + "column_break_61", + "write_off_account", + "write_off_cost_center", + "advances_section", + "allocate_advances_automatically", + "get_advances", + "advances", + "payment_schedule_section", + "payment_terms_template", + "payment_schedule", + "terms_section_break", + "tc_name", + "terms", + "printing_settings", + "letter_head", + "group_same_items", + "column_break_112", + "select_print_heading", + "language", + "more_info", + "credit_to", + "party_account_currency", + "is_opening", + "against_expense_account", + "column_break_63", + "status", + "inter_company_invoice_reference", + "remarks", + "subscription_section", + "from_date", + "to_date", + "column_break_114", + "auto_repeat", + "update_auto_repeat_reference" + ], + "fields": [ + { + "allow_on_submit": 1, + "default": "{supplier_name}", + "fieldname": "title", + "fieldtype": "Data", + "hidden": 1, + "label": "Title", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "naming_series", + "fieldtype": "Select", + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "ACC-PINV-.YYYY.-", + "print_hide": 1, + "reqd": 1, + "set_only_once": 1 + }, + { + "fieldname": "supplier", + "fieldtype": "Link", + "in_standard_filter": 1, + "label": "Supplier", + "oldfieldname": "supplier", + "oldfieldtype": "Link", + "options": "Supplier", + "print_hide": 1, + "search_index": 1 + }, + { + "bold": 1, + "depends_on": "supplier", + "fetch_from": "supplier.supplier_name", + "fieldname": "supplier_name", + "fieldtype": "Data", + "in_global_search": 1, + "label": "Supplier Name", + "oldfieldname": "supplier_name", + "oldfieldtype": "Data", + "read_only": 1 + }, + { + "fetch_from": "supplier.tax_id", + "fieldname": "tax_id", + "fieldtype": "Read Only", + "label": "Tax Id", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "due_date", + "fieldtype": "Date", + "label": "Due Date", + "oldfieldname": "due_date", + "oldfieldtype": "Date" + }, + { + "default": "0", + "fieldname": "is_paid", + "fieldtype": "Check", + "label": "Is Paid", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "is_return", + "fieldtype": "Check", + "label": "Is Return (Debit Note)", + "no_copy": 1, + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "apply_tds", + "fieldtype": "Check", + "label": "Apply Tax Withholding Amount", + "print_hide": 1 + }, + { + "fieldname": "column_break1", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "width": "50%" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "in_standard_filter": 1, + "label": "Company", + "options": "Company", + "print_hide": 1, + "remember_last_selected_value": 1 + }, + { + "fieldname": "cost_center", + "fieldtype": "Link", + "label": "Cost Center", + "options": "Cost Center" + }, + { + "default": "Today", + "fieldname": "posting_date", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Date", + "oldfieldname": "posting_date", + "oldfieldtype": "Date", + "print_hide": 1, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "posting_time", + "fieldtype": "Time", + "label": "Posting Time", + "no_copy": 1, + "print_hide": 1, + "print_width": "100px", + "width": "100px" + }, + { + "default": "0", + "depends_on": "eval:doc.docstatus==0", + "fieldname": "set_posting_time", + "fieldtype": "Check", + "label": "Edit Posting Date and Time", + "print_hide": 1 + }, + { + "fieldname": "amended_from", + "fieldtype": "Link", + "ignore_user_permissions": 1, + "label": "Amended From", + "no_copy": 1, + "oldfieldname": "amended_from", + "oldfieldtype": "Link", + "options": "Purchase Invoice", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:doc.on_hold", + "fieldname": "sb_14", + "fieldtype": "Section Break", + "label": "Hold Invoice" + }, + { + "default": "0", + "fieldname": "on_hold", + "fieldtype": "Check", + "label": "Hold Invoice" + }, + { + "depends_on": "eval:doc.on_hold", + "description": "Once set, this invoice will be on hold till the set date", + "fieldname": "release_date", + "fieldtype": "Date", + "label": "Release Date" + }, + { + "fieldname": "cb_17", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval:doc.on_hold", + "fieldname": "hold_comment", + "fieldtype": "Small Text", + "label": "Reason For Putting On Hold" + }, + { + "collapsible": 1, + "collapsible_depends_on": "bill_no", + "fieldname": "supplier_invoice_details", + "fieldtype": "Section Break", + "label": "Supplier Invoice Details" + }, + { + "fieldname": "bill_no", + "fieldtype": "Data", + "label": "Supplier Invoice No", + "oldfieldname": "bill_no", + "oldfieldtype": "Data", + "print_hide": 1 + }, + { + "fieldname": "column_break_15", + "fieldtype": "Column Break" + }, + { + "fieldname": "bill_date", + "fieldtype": "Date", + "label": "Supplier Invoice Date", + "oldfieldname": "bill_date", + "oldfieldtype": "Date", + "print_hide": 1 + }, + { + "depends_on": "return_against", + "fieldname": "returns", + "fieldtype": "Section Break", + "label": "Returns" + }, + { + "depends_on": "return_against", + "fieldname": "return_against", + "fieldtype": "Link", + "label": "Return Against Purchase Invoice", + "no_copy": 1, + "options": "Purchase Invoice", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "section_addresses", + "fieldtype": "Section Break", + "label": "Address and Contact" + }, + { + "fieldname": "supplier_address", + "fieldtype": "Link", + "label": "Select Supplier Address", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "address_display", + "fieldtype": "Small Text", + "label": "Address", + "read_only": 1 + }, + { + "fieldname": "contact_person", + "fieldtype": "Link", + "in_global_search": 1, + "label": "Contact Person", + "options": "Contact", + "print_hide": 1 + }, + { + "fieldname": "contact_display", + "fieldtype": "Small Text", + "label": "Contact", + "read_only": 1 + }, + { + "fieldname": "contact_mobile", + "fieldtype": "Small Text", + "label": "Mobile No", + "read_only": 1 + }, + { + "fieldname": "contact_email", + "fieldtype": "Small Text", + "label": "Contact Email", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "col_break_address", + "fieldtype": "Column Break" + }, + { + "fieldname": "shipping_address", + "fieldtype": "Link", + "label": "Select Shipping Address", + "options": "Address", + "print_hide": 1 + }, + { + "fieldname": "shipping_address_display", + "fieldtype": "Small Text", + "label": "Shipping Address", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "currency_and_price_list", + "fieldtype": "Section Break", + "label": "Currency and Price List", + "options": "fa fa-tag" + }, + { + "fieldname": "currency", + "fieldtype": "Link", + "label": "Currency", + "oldfieldname": "currency", + "oldfieldtype": "Select", + "options": "Currency", + "print_hide": 1 + }, + { + "fieldname": "conversion_rate", + "fieldtype": "Float", + "label": "Exchange Rate", + "oldfieldname": "conversion_rate", + "oldfieldtype": "Currency", + "precision": "9", + "print_hide": 1 + }, + { + "fieldname": "column_break2", + "fieldtype": "Column Break" + }, + { + "fieldname": "buying_price_list", + "fieldtype": "Link", + "label": "Price List", + "options": "Price List", + "print_hide": 1 + }, + { + "fieldname": "price_list_currency", + "fieldtype": "Link", + "label": "Price List Currency", + "options": "Currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "plc_conversion_rate", + "fieldtype": "Float", + "label": "Price List Exchange Rate", + "precision": "9", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "ignore_pricing_rule", + "fieldtype": "Check", + "label": "Ignore Pricing Rule", + "no_copy": 1, + "permlevel": 1, + "print_hide": 1 + }, + { + "fieldname": "sec_warehouse", + "fieldtype": "Section Break" + }, + { + "depends_on": "update_stock", + "fieldname": "set_warehouse", + "fieldtype": "Link", + "label": "Set Accepted Warehouse", + "options": "Warehouse", + "print_hide": 1 + }, + { + "depends_on": "update_stock", + "description": "Warehouse where you are maintaining stock of rejected items", + "fieldname": "rejected_warehouse", + "fieldtype": "Link", + "label": "Rejected Warehouse", + "no_copy": 1, + "options": "Warehouse", + "print_hide": 1 + }, + { + "fieldname": "col_break_warehouse", + "fieldtype": "Column Break" + }, + { + "default": "No", + "fieldname": "is_subcontracted", + "fieldtype": "Select", + "label": "Raw Materials Supplied", + "options": "No\nYes", + "print_hide": 1 + }, + { + "depends_on": "eval:doc.is_subcontracted==\"Yes\"", + "fieldname": "supplier_warehouse", + "fieldtype": "Link", + "label": "Supplier Warehouse", + "no_copy": 1, + "options": "Warehouse", + "print_hide": 1, + "print_width": "50px", + "width": "50px" + }, + { + "fieldname": "items_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart" + }, + { + "default": "0", + "fieldname": "update_stock", + "fieldtype": "Check", + "label": "Update Stock", + "print_hide": 1 + }, + { + "fieldname": "scan_barcode", + "fieldtype": "Data", + "label": "Scan Barcode" + }, + { + "allow_bulk_edit": 1, + "fieldname": "items", + "fieldtype": "Table", + "label": "Items", + "oldfieldname": "entries", + "oldfieldtype": "Table", + "options": "Purchase Invoice Item", + "reqd": 1 + }, + { + "fieldname": "pricing_rule_details", + "fieldtype": "Section Break", + "label": "Pricing Rules" + }, + { + "fieldname": "pricing_rules", + "fieldtype": "Table", + "label": "Pricing Rule Detail", + "options": "Pricing Rule Detail", + "read_only": 1 + }, + { + "collapsible_depends_on": "supplied_items", + "fieldname": "raw_materials_supplied", + "fieldtype": "Section Break", + "label": "Raw Materials Supplied" + }, + { + "fieldname": "supplied_items", + "fieldtype": "Table", + "label": "Supplied Items", + "options": "Purchase Receipt Item Supplied", + "read_only": 1 + }, + { + "fieldname": "section_break_26", + "fieldtype": "Section Break" + }, + { + "fieldname": "total_qty", + "fieldtype": "Float", + "label": "Total Quantity", + "read_only": 1 + }, + { + "fieldname": "base_total", + "fieldtype": "Currency", + "label": "Total (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_net_total", + "fieldtype": "Currency", + "label": "Net Total (Company Currency)", + "oldfieldname": "net_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_28", + "fieldtype": "Column Break" + }, + { + "fieldname": "total", + "fieldtype": "Currency", + "label": "Total", + "options": "currency", + "read_only": 1 + }, + { + "fieldname": "net_total", + "fieldtype": "Currency", + "label": "Net Total", + "oldfieldname": "net_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_net_weight", + "fieldtype": "Float", + "label": "Total Net Weight", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "taxes_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-money" + }, + { + "fieldname": "tax_category", + "fieldtype": "Link", + "label": "Tax Category", + "options": "Tax Category", + "print_hide": 1 + }, + { + "fieldname": "column_break_49", + "fieldtype": "Column Break" + }, + { + "fieldname": "shipping_rule", + "fieldtype": "Link", + "label": "Shipping Rule", + "options": "Shipping Rule", + "print_hide": 1 + }, + { + "fieldname": "section_break_51", + "fieldtype": "Section Break" + }, + { + "fieldname": "taxes_and_charges", + "fieldtype": "Link", + "label": "Purchase Taxes and Charges Template", + "oldfieldname": "purchase_other_charges", + "oldfieldtype": "Link", + "options": "Purchase Taxes and Charges Template", + "print_hide": 1 + }, + { + "fieldname": "taxes", + "fieldtype": "Table", + "label": "Purchase Taxes and Charges", + "oldfieldname": "purchase_tax_details", + "oldfieldtype": "Table", + "options": "Purchase Taxes and Charges" + }, + { + "collapsible": 1, + "fieldname": "sec_tax_breakup", + "fieldtype": "Section Break", + "label": "Tax Breakup" + }, + { + "fieldname": "other_charges_calculation", + "fieldtype": "Text", + "label": "Taxes and Charges Calculation", + "no_copy": 1, + "oldfieldtype": "HTML", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "totals", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-money" + }, + { + "fieldname": "base_taxes_and_charges_added", + "fieldtype": "Currency", + "label": "Taxes and Charges Added (Company Currency)", + "oldfieldname": "other_charges_added", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_taxes_and_charges_deducted", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted (Company Currency)", + "oldfieldname": "other_charges_deducted", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges (Company Currency)", + "oldfieldname": "total_tax", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_40", + "fieldtype": "Column Break" + }, + { + "fieldname": "taxes_and_charges_added", + "fieldtype": "Currency", + "label": "Taxes and Charges Added", + "oldfieldname": "other_charges_added_import", + "oldfieldtype": "Currency", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "taxes_and_charges_deducted", + "fieldtype": "Currency", + "label": "Taxes and Charges Deducted", + "oldfieldname": "other_charges_deducted_import", + "oldfieldtype": "Currency", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_taxes_and_charges", + "fieldtype": "Currency", + "label": "Total Taxes and Charges", + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "discount_amount", + "fieldname": "section_break_44", + "fieldtype": "Section Break", + "label": "Additional Discount" + }, + { + "default": "Grand Total", + "fieldname": "apply_discount_on", + "fieldtype": "Select", + "label": "Apply Additional Discount On", + "options": "\nGrand Total\nNet Total", + "print_hide": 1 + }, + { + "fieldname": "base_discount_amount", + "fieldtype": "Currency", + "label": "Additional Discount Amount (Company Currency)", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_46", + "fieldtype": "Column Break" + }, + { + "fieldname": "additional_discount_percentage", + "fieldtype": "Float", + "label": "Additional Discount Percentage", + "print_hide": 1 + }, + { + "fieldname": "discount_amount", + "fieldtype": "Currency", + "label": "Additional Discount Amount", + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "section_break_49", + "fieldtype": "Section Break" + }, + { + "fieldname": "base_grand_total", + "fieldtype": "Currency", + "label": "Grand Total (Company Currency)", + "oldfieldname": "grand_total", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_rounding_adjustment", + "fieldtype": "Currency", + "label": "Rounding Adjustment (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "eval:!doc.disable_rounded_total", + "fieldname": "base_rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "base_in_words", + "fieldtype": "Data", + "label": "In Words (Company Currency)", + "oldfieldname": "in_words", + "oldfieldtype": "Data", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break8", + "fieldtype": "Column Break", + "oldfieldtype": "Column Break", + "print_hide": 1, + "width": "50%" + }, + { + "fieldname": "grand_total", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Grand Total", + "oldfieldname": "grand_total_import", + "oldfieldtype": "Currency", + "options": "currency", + "read_only": 1 + }, + { + "fieldname": "rounding_adjustment", + "fieldtype": "Currency", + "label": "Rounding Adjustment", + "no_copy": 1, + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "depends_on": "eval:!doc.disable_rounded_total", + "fieldname": "rounded_total", + "fieldtype": "Currency", + "label": "Rounded Total", + "no_copy": 1, + "options": "currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "in_words", + "fieldtype": "Data", + "label": "In Words", + "oldfieldname": "in_words_import", + "oldfieldtype": "Data", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "total_advance", + "fieldtype": "Currency", + "label": "Total Advance", + "no_copy": 1, + "oldfieldname": "total_advance", + "oldfieldtype": "Currency", + "options": "party_account_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "outstanding_amount", + "fieldtype": "Currency", + "label": "Outstanding Amount", + "no_copy": 1, + "oldfieldname": "outstanding_amount", + "oldfieldtype": "Currency", + "options": "party_account_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "0", + "depends_on": "grand_total", + "fieldname": "disable_rounded_total", + "fieldtype": "Check", + "label": "Disable Rounded Total" + }, + { + "collapsible": 1, + "collapsible_depends_on": "paid_amount", + "depends_on": "eval:doc.is_paid===1||(doc.advances && doc.advances.length>0)", + "fieldname": "payments_section", + "fieldtype": "Section Break", + "label": "Payments" + }, + { + "fieldname": "mode_of_payment", + "fieldtype": "Link", + "label": "Mode of Payment", + "options": "Mode of Payment", + "print_hide": 1 + }, + { + "fieldname": "cash_bank_account", + "fieldtype": "Link", + "label": "Cash/Bank Account", + "options": "Account" + }, + { + "fieldname": "clearance_date", + "fieldtype": "Date", + "hidden": 1, + "label": "Clearance Date" + }, + { + "fieldname": "col_br_payments", + "fieldtype": "Column Break" + }, + { + "depends_on": "is_paid", + "fieldname": "paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount", + "no_copy": 1, + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "base_paid_amount", + "fieldtype": "Currency", + "label": "Paid Amount (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "write_off_amount", + "depends_on": "grand_total", + "fieldname": "write_off", + "fieldtype": "Section Break", + "label": "Write Off" + }, + { + "fieldname": "write_off_amount", + "fieldtype": "Currency", + "label": "Write Off Amount", + "no_copy": 1, + "options": "currency", + "print_hide": 1 + }, + { + "fieldname": "base_write_off_amount", + "fieldtype": "Currency", + "label": "Write Off Amount (Company Currency)", + "no_copy": 1, + "options": "Company:company:default_currency", + "print_hide": 1, + "read_only": 1 + }, + { + "fieldname": "column_break_61", + "fieldtype": "Column Break" + }, + { + "depends_on": "eval:flt(doc.write_off_amount)!=0", + "fieldname": "write_off_account", + "fieldtype": "Link", + "label": "Write Off Account", + "options": "Account", + "print_hide": 1 + }, + { + "depends_on": "eval:flt(doc.write_off_amount)!=0", + "fieldname": "write_off_cost_center", + "fieldtype": "Link", + "label": "Write Off Cost Center", + "options": "Cost Center", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "advances", + "fieldname": "advances_section", + "fieldtype": "Section Break", + "label": "Advance Payments", + "oldfieldtype": "Section Break", + "options": "fa fa-money", + "print_hide": 1 + }, + { + "default": "0", + "fieldname": "allocate_advances_automatically", + "fieldtype": "Check", + "label": "Set Advances and Allocate (FIFO)" + }, + { + "depends_on": "eval:!doc.allocate_advances_automatically", + "fieldname": "get_advances", + "fieldtype": "Button", + "label": "Get Advances Paid", + "oldfieldtype": "Button", + "print_hide": 1 + }, + { + "fieldname": "advances", + "fieldtype": "Table", + "label": "Advances", + "no_copy": 1, + "oldfieldname": "advance_allocation_details", + "oldfieldtype": "Table", + "options": "Purchase Invoice Advance", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "eval:(!doc.is_return)", + "fieldname": "payment_schedule_section", + "fieldtype": "Section Break", + "label": "Payment Terms" + }, + { + "fieldname": "payment_terms_template", + "fieldtype": "Link", + "label": "Payment Terms Template", + "options": "Payment Terms Template" + }, + { + "fieldname": "payment_schedule", + "fieldtype": "Table", + "label": "Payment Schedule", + "no_copy": 1, + "options": "Payment Schedule", + "print_hide": 1 + }, + { + "collapsible": 1, + "collapsible_depends_on": "terms", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "label": "Terms and Conditions", + "options": "fa fa-legal" + }, + { + "fieldname": "tc_name", + "fieldtype": "Link", + "label": "Terms", + "options": "Terms and Conditions", + "print_hide": 1 + }, + { + "fieldname": "terms", + "fieldtype": "Text Editor", + "label": "Terms and Conditions1" + }, + { + "collapsible": 1, + "fieldname": "printing_settings", + "fieldtype": "Section Break", + "label": "Printing Settings" + }, + { + "allow_on_submit": 1, + "fieldname": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "options": "Letter Head", + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "default": "0", + "fieldname": "group_same_items", + "fieldtype": "Check", + "label": "Group same items", + "print_hide": 1 + }, + { + "fieldname": "column_break_112", + "fieldtype": "Column Break" + }, + { + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "label": "Print Heading", + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "print_hide": 1, + "report_hide": 1 + }, + { + "fieldname": "language", + "fieldtype": "Data", + "label": "Print Language", + "print_hide": 1, + "read_only": 1 + }, + { + "collapsible": 1, + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "More Information", + "oldfieldtype": "Section Break", + "options": "fa fa-file-text", + "print_hide": 1 + }, + { + "fieldname": "credit_to", + "fieldtype": "Link", + "label": "Credit To", + "oldfieldname": "credit_to", + "oldfieldtype": "Link", + "options": "Account", + "print_hide": 1, + "reqd": 1, + "search_index": 1 + }, + { + "fieldname": "party_account_currency", + "fieldtype": "Link", + "hidden": 1, + "label": "Party Account Currency", + "no_copy": 1, + "options": "Currency", + "print_hide": 1, + "read_only": 1 + }, + { + "default": "No", + "fieldname": "is_opening", + "fieldtype": "Select", + "label": "Is Opening", + "oldfieldname": "is_opening", + "oldfieldtype": "Select", + "options": "No\nYes", + "print_hide": 1 + }, + { + "fieldname": "against_expense_account", + "fieldtype": "Small Text", + "hidden": 1, + "label": "Against Expense Account", + "no_copy": 1, + "oldfieldname": "against_expense_account", + "oldfieldtype": "Small Text", + "print_hide": 1 + }, + { + "fieldname": "column_break_63", + "fieldtype": "Column Break" + }, + { + "default": "Draft", + "fieldname": "status", + "fieldtype": "Select", + "in_standard_filter": 1, + "label": "Status", + "options": "\nDraft\nReturn\nDebit Note Issued\nSubmitted\nPaid\nUnpaid\nOverdue\nCancelled", + "print_hide": 1 + }, + { + "fieldname": "inter_company_invoice_reference", + "fieldtype": "Link", + "label": "Inter Company Invoice Reference", + "options": "Sales Invoice", + "read_only": 1 + }, + { + "fieldname": "remarks", + "fieldtype": "Small Text", + "label": "Remarks", + "no_copy": 1, + "oldfieldname": "remarks", + "oldfieldtype": "Text", + "print_hide": 1 + }, + { + "fieldname": "subscription_section", + "fieldtype": "Section Break", + "label": "Subscription Section", + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "description": "Start date of current invoice's period", + "fieldname": "from_date", + "fieldtype": "Date", + "label": "From Date", + "no_copy": 1, + "print_hide": 1 + }, + { + "allow_on_submit": 1, + "description": "End date of current invoice's period", + "fieldname": "to_date", + "fieldtype": "Date", + "label": "To Date", + "no_copy": 1, + "print_hide": 1 + }, + { + "fieldname": "column_break_114", + "fieldtype": "Column Break" + }, + { + "fieldname": "auto_repeat", + "fieldtype": "Link", + "label": "Auto Repeat", + "no_copy": 1, + "options": "Auto Repeat", + "print_hide": 1, + "read_only": 1 + }, + { + "allow_on_submit": 1, + "depends_on": "eval: doc.auto_repeat", + "fieldname": "update_auto_repeat_reference", + "fieldtype": "Button", + "label": "Update Auto Repeat Reference" + }, + { + "collapsible": 1, + "fieldname": "accounting_dimensions_section", + "fieldtype": "Section Break", + "label": "Accounting Dimensions " + }, + { + "fieldname": "dimension_col_break", + "fieldtype": "Column Break" + } + ], + "icon": "fa fa-file-text", + "idx": 204, + "is_submittable": 1, + "modified": "2019-09-17 22:31:42.666601", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Purchase Invoice", + "name_case": "Title Case", + "owner": "Administrator", + "permissions": [ + { + "amend": 1, + "cancel": 1, + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Accounts User", + "share": 1, + "submit": 1, + "write": 1 + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase User" + }, + { + "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 + }, + { + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Auditor" + }, + { + "permlevel": 1, + "read": 1, + "role": "Accounts Manager", + "write": 1 + } + ], + "search_fields": "posting_date, supplier, bill_no, base_grand_total, outstanding_amount", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC", + "timeline_field": "supplier", + "title_field": "title", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index bc2ddffbcf3..bc9c1783ef2 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -364,7 +364,7 @@ class PurchaseInvoice(BuyingController): update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes" make_gl_entries(gl_entries, cancel=(self.docstatus == 2), - update_outstanding=update_outstanding, merge_entries=False) + update_outstanding=update_outstanding, merge_entries=False, from_repost=from_repost) if update_outstanding == "No": update_outstanding_amt(self.credit_to, "Supplier", self.supplier, diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json index 0923a5b6172..3a19bb1b6bf 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json @@ -591,7 +591,6 @@ "oldfieldname": "purchase_order", "oldfieldtype": "Link", "options": "Purchase Order", - "print_hide": 1, "read_only": 1, "search_index": 1 }, @@ -607,6 +606,7 @@ "fieldname": "include_exploded_items", "fieldtype": "Check", "label": "Include Exploded Items", + "print_hide": 1, "read_only": 1 }, { @@ -758,7 +758,7 @@ ], "idx": 1, "istable": 1, - "modified": "2019-06-02 06:36:17.078419", + "modified": "2019-09-17 22:32:05.984240", "modified_by": "Administrator", "module": "Accounts", "name": "Purchase Invoice Item", diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 261363c4937..7d4fc639554 100755 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -238,7 +238,7 @@ def get_contacts(customers): customers = [frappe._dict({'name': customers})] for data in customers: - contact = frappe.db.sql(""" select email_id, phone from `tabContact` + contact = frappe.db.sql(""" select email_id, phone, mobile_no from `tabContact` where is_primary_contact=1 and name in (select parent from `tabDynamic Link` where link_doctype = 'Customer' and link_name = %s and parenttype = 'Contact')""", data.name, as_dict=1) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index abbac77783b..e1256a78d95 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -698,7 +698,7 @@ class SalesInvoice(SellingController): cint(self.redeem_loyalty_points)) else "Yes" make_gl_entries(gl_entries, cancel=(self.docstatus == 2), - update_outstanding=update_outstanding, merge_entries=False) + update_outstanding=update_outstanding, merge_entries=False, from_repost=from_repost) if update_outstanding == "No": from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt diff --git a/erpnext/accounts/page/pos/pos.js b/erpnext/accounts/page/pos/pos.js index ff0c265a42d..8dc00f3f218 100755 --- a/erpnext/accounts/page/pos/pos.js +++ b/erpnext/accounts/page/pos/pos.js @@ -817,6 +817,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ if(reg.test(data.name.toLowerCase()) || reg.test(data.customer_name.toLowerCase()) || (contact && reg.test(contact["phone"])) + || (contact && reg.test(contact["mobile_no"])) || (data.customer_group && reg.test(data.customer_group.toLowerCase()))){ return data; } @@ -833,6 +834,7 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ if(contact && !c['phone']) { c["phone"] = contact["phone"]; c["email_id"] = contact["email_id"]; + c["mobile_no"] = contact["mobile_no"]; } me.customers_mapper.push({ @@ -842,9 +844,10 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({ customer_group: c.customer_group, territory: c.territory, phone: contact ? contact["phone"] : '', + mobile_no: contact ? contact["mobile_no"] : '', email_id: contact ? contact["email_id"] : '', searchtext: ['customer_name', 'customer_group', 'name', 'value', - 'label', 'email_id', 'phone'] + 'label', 'email_id', 'phone', 'mobile_no'] .map(key => c[key]).join(' ') .toLowerCase() }); diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 8cbf845863d..bcbd427186c 100755 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -59,7 +59,6 @@ class ReceivablePayableReport(object): self.invoices = set() def get_data(self): - t1 = now() self.get_gl_entries() self.voucher_balance = OrderedDict() self.init_voucher_balance() # invoiced, paid, credit_note, outstanding @@ -73,6 +72,9 @@ class ReceivablePayableReport(object): # fetch future payments against invoices self.get_future_payments() + # Get return entries + self.get_return_entries() + self.data = [] for gle in self.gl_entries: self.update_voucher_balance(gle) @@ -91,6 +93,7 @@ class ReceivablePayableReport(object): party = gle.party, posting_date = gle.posting_date, remarks = gle.remarks, + account_currency = gle.account_currency, invoiced = 0.0, paid = 0.0, credit_note = 0.0, @@ -106,7 +109,6 @@ class ReceivablePayableReport(object): # get the row where this balance needs to be updated # if its a payment, it will return the linked invoice or will be considered as advance row = self.get_voucher_balance(gle) - # gle_balance will be the total "debit - credit" for receivable type reports and # and vice-versa for payable type reports gle_balance = self.get_gle_balance(gle) @@ -131,7 +133,18 @@ class ReceivablePayableReport(object): if gle.against_voucher: # find invoice - voucher_balance = self.voucher_balance.get((gle.against_voucher_type, gle.against_voucher, gle.party)) + against_voucher = gle.against_voucher + + # If payment is made against credit note + # and credit note is made against a Sales Invoice + # then consider the payment against original sales invoice. + if gle.against_voucher_type in ('Sales Invoice', 'Purchase Invoice'): + if gle.against_voucher in self.return_entries: + return_against = self.return_entries.get(gle.against_voucher) + if return_against: + against_voucher = return_against + + voucher_balance = self.voucher_balance.get((gle.against_voucher_type, against_voucher, gle.party)) if not voucher_balance: # no invoice, this is an invoice / stand-alone payment / credit note @@ -258,7 +271,6 @@ class ReceivablePayableReport(object): # customer / supplier name party_details = self.get_party_details(row.party) row.update(party_details) - if self.filters.get(scrub(self.filters.party_type)): row.currency = row.account_currency else: @@ -423,6 +435,19 @@ class ReceivablePayableReport(object): if row.future_ref: row.future_ref = ', '.join(row.future_ref) + def get_return_entries(self): + doctype = "Sales Invoice" if self.party_type == "Customer" else "Purchase Invoice" + filters={ + 'is_return': 1, + 'docstatus': 1 + } + party_field = scrub(self.filters.party_type) + if self.filters.get(party_field): + filters.update({party_field: self.filters.get(party_field)}) + self.return_entries = frappe._dict( + frappe.get_all(doctype, filters, ['name', 'return_against'], as_list=1) + ) + def set_ageing(self, row): if self.filters.ageing_based_on == "Due Date": entry_date = row.due_date @@ -689,11 +714,11 @@ class ReceivablePayableReport(object): def get_chart_data(self): rows = [] for row in self.data: - rows.append( - { - 'values': [row.range1, row.range2, row.range3, row.range4, row.range5] - } - ) + values = [row.range1, row.range2, row.range3, row.range4, row.range5] + precision = cint(frappe.db.get_default("float_precision")) or 2 + rows.append({ + 'values': [flt(val, precision) for val in values] + }) self.chart = { "data": { diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index 2b32fa93785..1d13ed16377 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe from frappe.utils import flt from frappe import msgprint, _ +from frappe.model.meta import get_field_precision from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_accounting_dimensions def execute(filters=None): diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json index 0490119ad47..557a62d8fea 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.json @@ -1,6 +1,7 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2018-08-21 11:32:30.874923", + "disable_prepared_report": 0, "disabled": 0, "docstatus": 0, "doctype": "Report", diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py index 8ca466e4b88..4ac0f656119 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py @@ -70,7 +70,7 @@ def get_result(filters): rate = [i.tax_withholding_rate for i in tds_doc.rates if i.fiscal_year == gle_map[d][0].fiscal_year] - if rate and len(rate) > 0: + if rate and len(rate) > 0 and tds_deducted: rate = rate[0] if getdate(filters.from_date) <= gle_map[d][0].posting_date \ @@ -164,7 +164,7 @@ def get_columns(filters): { "label": _("TDS Rate %"), "fieldname": "tds_rate", - "fieldtype": "Float", + "fieldtype": "Percent", "width": 90 }, { diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json index 05c4926fabb..66ad97ac09e 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.json @@ -267,6 +267,7 @@ "fieldtype": "Currency", "label": "Last Purchase Rate", "options": "currency", + "print_hide": 1, "read_only": 1 }, { @@ -561,7 +562,8 @@ "depends_on": "eval:parent.is_subcontracted == 'Yes'", "fieldname": "include_exploded_items", "fieldtype": "Check", - "label": "Include Exploded Items" + "label": "Include Exploded Items", + "print_hide": 1 }, { "fieldname": "section_break_56", @@ -701,7 +703,7 @@ ], "idx": 1, "istable": 1, - "modified": "2019-06-23 20:03:13.818917", + "modified": "2019-09-17 22:32:34.703923", "modified_by": "Administrator", "module": "Buying", "name": "Purchase Order Item", @@ -712,4 +714,4 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json index 671c14b6d54..97aa9221e2f 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.json @@ -1,1004 +1,316 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 1, - "allow_rename": 0, - "autoname": "naming_series:", - "beta": 0, - "creation": "2016-02-25 01:24:07.224790", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Document", - "editable_grid": 0, + "allow_import": 1, + "autoname": "naming_series:", + "creation": "2016-02-25 01:24:07.224790", + "doctype": "DocType", + "document_type": "Document", + "engine": "InnoDB", + "field_order": [ + "naming_series", + "company", + "vendor", + "column_break1", + "transaction_date", + "suppliers_section", + "suppliers", + "get_suppliers_button", + "items_section", + "items", + "link_to_mrs", + "supplier_response_section", + "email_template", + "message_for_supplier", + "terms_section_break", + "tc_name", + "terms", + "printing_settings", + "select_print_heading", + "letter_head", + "more_info", + "status", + "fiscal_year", + "column_break3", + "amended_from" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "fieldname": "naming_series", - "fieldtype": "Select", - "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": "Series", - "length": 0, - "no_copy": 1, - "oldfieldname": "naming_series", - "oldfieldtype": "Select", - "options": "PUR-RFQ-.YYYY.-", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "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": 1, - "translatable": 0, - "unique": 0 - }, + "fieldname": "naming_series", + "fieldtype": "Select", + "in_list_view": 1, + "label": "Series", + "no_copy": 1, + "oldfieldname": "naming_series", + "oldfieldtype": "Select", + "options": "PUR-RFQ-.YYYY.-", + "print_hide": 1, + "reqd": 1, + "set_only_once": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "", - "fieldname": "company", - "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": "Company", - "length": 0, - "no_copy": 0, - "oldfieldname": "company", - "oldfieldtype": "Link", - "options": "Company", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 1, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "company", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Company", + "oldfieldname": "company", + "oldfieldtype": "Link", + "options": "Company", + "print_hide": 1, + "remember_last_selected_value": 1, + "reqd": 1, + "search_index": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "description": "For individual supplier", - "fieldname": "vendor", - "fieldtype": "Link", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 1, - "label": "Supplier", - "length": 0, - "no_copy": 1, - "options": "Supplier", - "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 - }, + "description": "For individual supplier", + "fieldname": "vendor", + "fieldtype": "Link", + "hidden": 1, + "in_standard_filter": 1, + "label": "Supplier", + "no_copy": 1, + "options": "Supplier", + "read_only": 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, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "50%", - "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", + "print_width": "50%", "width": "50%" - }, + }, { - "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": 1, - "in_standard_filter": 0, - "label": "Date", - "length": 0, - "no_copy": 0, - "oldfieldname": "transaction_date", - "oldfieldtype": "Date", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "transaction_date", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Date", + "oldfieldname": "transaction_date", + "oldfieldtype": "Date", + "reqd": 1, + "search_index": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "suppliers_section", - "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": "suppliers_section", + "fieldtype": "Section Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "suppliers", - "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": "Supplier Detail", - "length": 0, - "no_copy": 0, - "options": "Request for Quotation Supplier", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "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": "suppliers", + "fieldtype": "Table", + "label": "Supplier Detail", + "options": "Request for Quotation Supplier", + "print_hide": 1, + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "get_suppliers_button", - "fieldtype": "Button", - "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": "Get Suppliers", - "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": "get_suppliers_button", + "fieldtype": "Button", + "label": "Get Suppliers" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "items_section", - "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, - "oldfieldtype": "Section Break", - "options": "fa fa-shopping-cart", - "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": "items_section", + "fieldtype": "Section Break", + "oldfieldtype": "Section Break", + "options": "fa fa-shopping-cart" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "items", - "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": "Items", - "length": 0, - "no_copy": 0, - "oldfieldname": "po_details", - "oldfieldtype": "Table", - "options": "Request for Quotation Item", - "permlevel": 0, - "precision": "", - "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": "items", + "fieldtype": "Table", + "label": "Items", + "oldfieldname": "po_details", + "oldfieldtype": "Table", + "options": "Request for Quotation Item", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:doc.docstatus===0 && (doc.items && doc.items.length)", - "fieldname": "link_to_mrs", - "fieldtype": "Button", - "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": "Link to material requests", - "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 - }, + "depends_on": "eval:doc.docstatus===0 && (doc.items && doc.items.length)", + "fieldname": "link_to_mrs", + "fieldtype": "Button", + "label": "Link to Material Requests" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "supplier_response_section", - "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": "supplier_response_section", + "fieldtype": "Section Break" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "email_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": "Email Template", - "length": 0, - "no_copy": 0, - "options": "Email Template", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "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": "email_template", + "fieldtype": "Link", + "label": "Email Template", + "options": "Email Template", + "print_hide": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "message_for_supplier", - "fieldtype": "Text Editor", - "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": "Message for Supplier", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 1, - "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": "message_for_supplier", + "fieldtype": "Text Editor", + "in_list_view": 1, + "label": "Message for Supplier", + "print_hide": 1, + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "collapsible_depends_on": "terms", - "columns": 0, - "fieldname": "terms_section_break", - "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": "Terms and Conditions", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-legal", - "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 - }, + "collapsible": 1, + "collapsible_depends_on": "terms", + "fieldname": "terms_section_break", + "fieldtype": "Section Break", + "label": "Terms and Conditions", + "oldfieldtype": "Section Break", + "options": "fa fa-legal" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "tc_name", - "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": "Terms", - "length": 0, - "no_copy": 0, - "oldfieldname": "tc_name", - "oldfieldtype": "Link", - "options": "Terms and Conditions", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "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": "tc_name", + "fieldtype": "Link", + "label": "Terms", + "oldfieldname": "tc_name", + "oldfieldtype": "Link", + "options": "Terms and Conditions", + "print_hide": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "terms", - "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": "Terms and Conditions", - "length": 0, - "no_copy": 0, - "oldfieldname": "terms", - "oldfieldtype": "Text Editor", - "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": "terms", + "fieldtype": "Text Editor", + "label": "Terms and Conditions", + "oldfieldname": "terms", + "oldfieldtype": "Text Editor" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "printing_settings", - "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": "Printing Settings", - "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 - }, + "collapsible": 1, + "fieldname": "printing_settings", + "fieldtype": "Section Break", + "label": "Printing Settings" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "select_print_heading", - "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": "Print Heading", - "length": 0, - "no_copy": 1, - "oldfieldname": "select_print_heading", - "oldfieldtype": "Link", - "options": "Print Heading", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 1, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "allow_on_submit": 1, + "fieldname": "select_print_heading", + "fieldtype": "Link", + "label": "Print Heading", + "no_copy": 1, + "oldfieldname": "select_print_heading", + "oldfieldtype": "Link", + "options": "Print Heading", + "print_hide": 1, + "report_hide": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "letter_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": "Letter Head", - "length": 0, - "no_copy": 0, - "oldfieldname": "letter_head", - "oldfieldtype": "Select", - "options": "Letter Head", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "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": "letter_head", + "fieldtype": "Link", + "label": "Letter Head", + "oldfieldname": "letter_head", + "oldfieldtype": "Select", + "options": "Letter Head", + "print_hide": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 1, - "columns": 0, - "fieldname": "more_info", - "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": "More Information", - "length": 0, - "no_copy": 0, - "oldfieldtype": "Section Break", - "options": "fa fa-file-text", - "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 - }, + "collapsible": 1, + "fieldname": "more_info", + "fieldtype": "Section Break", + "label": "More Information", + "oldfieldtype": "Section Break", + "options": "fa fa-file-text" + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "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": 1, - "oldfieldname": "status", - "oldfieldtype": "Select", - "options": "\nDraft\nSubmitted\nCancelled", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "status", + "fieldtype": "Select", + "label": "Status", + "no_copy": 1, + "oldfieldname": "status", + "oldfieldtype": "Select", + "options": "\nDraft\nSubmitted\nCancelled", + "print_hide": 1, + "read_only": 1, + "reqd": 1, + "search_index": 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": 0, - "in_standard_filter": 0, - "label": "Fiscal Year", - "length": 0, - "no_copy": 0, - "oldfieldname": "fiscal_year", - "oldfieldtype": "Select", - "options": "Fiscal Year", - "permlevel": 0, - "precision": "", - "print_hide": 1, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fieldname": "fiscal_year", + "fieldtype": "Link", + "label": "Fiscal Year", + "oldfieldname": "fiscal_year", + "oldfieldtype": "Select", + "options": "Fiscal Year", + "print_hide": 1, + "reqd": 1, + "search_index": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "column_break3", - "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 - }, + "fieldname": "column_break3", + "fieldtype": "Column Break" + }, { - "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": "Request for Quotation", - "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 + "fieldname": "amended_from", + "fieldtype": "Link", + "label": "Amended From", + "no_copy": 1, + "options": "Request for Quotation", + "print_hide": 1, + "read_only": 1 } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "icon": "fa fa-shopping-cart", - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 1, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2018-08-21 14:44:22.102552", - "modified_by": "Administrator", - "module": "Buying", - "name": "Request for Quotation", - "name_case": "", - "owner": "Administrator", + ], + "icon": "fa fa-shopping-cart", + "is_submittable": 1, + "modified": "2019-09-24 15:08:32.750661", + "modified_by": "Administrator", + "module": "Buying", + "name": "Request for Quotation", + "owner": "Administrator", "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": "Manufacturing 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": "Manufacturing 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": "Purchase 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": "Purchase Manager", + "share": 1, + "submit": 1, "write": 1 - }, + }, { - "amend": 1, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Purchase User", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "amend": 1, + "create": 1, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Purchase User", + "share": 1, "write": 1 - }, + }, { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Stock User", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 0 - }, + "email": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Stock User" + }, { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 1, - "print": 0, - "read": 1, - "report": 0, - "role": "Purchase Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, + "permlevel": 1, + "read": 1, + "role": "Purchase Manager", "write": 1 - }, + }, { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 1, - "print": 0, - "read": 1, - "report": 0, - "role": "All", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 0 + "permlevel": 1, + "read": 1, + "role": "All" } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 1, - "search_fields": "status, transaction_date", - "show_name_in_global_search": 1, - "sort_field": "modified", - "sort_order": "DESC", - "timeline_field": "", - "title_field": "", - "track_changes": 0, - "track_seen": 0, - "track_views": 0 + ], + "search_fields": "status, transaction_date", + "show_name_in_global_search": 1, + "sort_field": "modified", + "sort_order": "DESC" } \ No newline at end of file diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 37548ea9b80..31a78c36257 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -143,7 +143,7 @@ class AccountsController(TransactionBase): if not self.cash_bank_account: # show message that the amount is not paid frappe.throw(_("Note: Payment Entry will not be created since 'Cash or Bank Account' was not specified")) - + if cint(self.is_return) and self.grand_total > self.paid_amount: self.paid_amount = flt(flt(self.grand_total), self.precision("paid_amount")) @@ -1195,8 +1195,10 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil child_item.rate = flt(d.get("rate")) if flt(child_item.price_list_rate): - child_item.discount_percentage = flt((1 - flt(child_item.rate) / flt(child_item.price_list_rate)) * 100.0, \ + discount = flt((1 - flt(child_item.rate) / flt(child_item.price_list_rate)) * 100.0, child_item.precision("discount_percentage")) + if discount > 0: + child_item.discount_percentage = discount child_item.flags.ignore_validate_update_after_submit = True if new_child_flag: @@ -1220,7 +1222,6 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil parent.update_status_updater() else: parent.check_credit_limit() - parent.save() if parent_doctype == 'Purchase Order': diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index 084f84b1f9b..9d37df0406b 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -598,6 +598,7 @@ class BuyingController(StockController): 'item_code': d.item_code, 'via_stock_ledger': False, 'company': self.company, + 'supplier': self.supplier, 'actual_qty': d.qty, 'purchase_document_type': self.doctype, 'purchase_document_no': self.name, @@ -625,6 +626,7 @@ class BuyingController(StockController): 'asset_category': item_data.get('asset_category'), 'location': row.asset_location, 'company': self.company, + 'supplier': self.supplier, 'purchase_date': self.posting_date, 'calculate_depreciation': 1, 'purchase_receipt_amount': purchase_amount, diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index dee71dc9448..29f8dd57026 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -283,7 +283,7 @@ def copy_attributes_to_variant(item, variant): if 'description' not in allow_fields: if not variant.description: variant.description = "" - + else: if item.variant_based_on=='Item Attribute': if variant.attributes: attributes_description = item.description + " " @@ -291,7 +291,7 @@ def copy_attributes_to_variant(item, variant): attributes_description += "