[x] Pass all non declared invoices in report (These will be pre-selected)
Check if invoice has value in custom field: facelec_vat_declaration
If it has value, check if value exists in doctype list "VAT Declaration"
If it does, then this invoice has already been declared to tax authorities. Therefore do not include when filtering for non-declared invoices.
Revisamos si la factura tiene algun valor en el campo facelec_vat_declaration
Si tiene valor, revisamos si ese valor existe en el campo "VAT Declaration"
Si si existe, entonces significa que esta factura ya fue declarada a las autoridades, por lo tanto no incluirla cuando se filtre por todas aquellas facturas no declaradas en asiste libros
[x] Create a new VAT Declaration doctype with the items for it including all the passed invoices.
[x] Save the document.
[x] Submit the VAT Declaration to ERPNext. Modify each of the selected invoices in their custom field, adding the name of the newly created VAT Declaration.
[ ] Print format for VAT declaration similar or equal to VAT declaration report print format.
Connect logic that creates the VAT generation.
Process:
facelec_vat_declaration
If it has value, check if value exists in doctype list "VAT Declaration" If it does, then this invoice has already been declared to tax authorities. Therefore do not include when filtering for non-declared invoices.Revisamos si la factura tiene algun valor en el campo
facelec_vat_declaration
Si tiene valor, revisamos si ese valor existe en el campo "VAT Declaration" Si si existe, entonces significa que esta factura ya fue declarada a las autoridades, por lo tanto no incluirla cuando se filtre por todas aquellas facturas no declaradas en asiste libros[x] Create a new VAT Declaration doctype with the items for it including all the passed invoices.
[x] Save the document.
[x] Submit the VAT Declaration to ERPNext. Modify each of the selected invoices in their custom field, adding the name of the newly created VAT Declaration.
[ ] Print format for VAT declaration similar or equal to VAT declaration report print format.