Last active
November 15, 2019 14:16
-
-
Save vivascau/26a153d37a5629d2f1219426d90c47aa to your computer and use it in GitHub Desktop.
FreeAgent Assign `N/A` or `Exempt` VAT in Full report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const START_FROM_ENTRY_IN_LIST_NO = 8 | |
const assign0VAT = () => { | |
const expense = document.querySelector(`#vat_purchases > tbody > tr:nth-child(${START_FROM_ENTRY_IN_LIST_NO}) > td:nth-child(2) > a`) | |
expense.click(); | |
setTimeout(setValues, 1500); | |
} | |
const setValues = () => { | |
const purchase = document.querySelector('#purchase_sales_tax_rate'); | |
const expense = document.querySelector('#expense_sales_tax_rate'); | |
if (purchase) { | |
purchase.value = "-2.0"; | |
} else if (expense) { | |
expense.value = "-4.0" | |
} | |
document.querySelector('input[name="commit"]').click(); | |
} | |
assign0VAT() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment