Created
October 23, 2014 10:41
-
-
Save davestewart/21322c49996962b3733b to your computer and use it in GitHub Desktop.
TamperMonkey script for FreeAgent to hide unused expense categories on Explanation screen
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
// ==UserScript== | |
// @name Hide unused FreeAgent expense categories | |
// @namespace http://davestewart.uk | |
// @version 0.1 | |
// @description Hides unused categories on FreeAgent Explanation screen | |
// @author Dave Stewart | |
// @match https://davestewart.freeagent.com/bank_accounts/ | |
// @grant none | |
// ==/UserScript== | |
var cats = | |
{ | |
// Admin expenses (VATable) | |
"285":"Accommodation and Meals", | |
"292":"Accountancy Fees", | |
"288":"Advertising and Promotion", | |
"335":"Business Entertaining", | |
//"278":"Childcare Vouchers", | |
"270":"Computer Hardware", | |
"269":"Computer Software", | |
"293":"Consultancy Fees", | |
"273":"Internet & Telephone", | |
//"291":"Leasing Payments", | |
"290":"Legal and Professional Fees", | |
"274":"Mobile Phone", | |
//"283":"Motor Expenses", | |
"250":"Office Costs", | |
"271":"Office Equipment", | |
"272":"Other Computer Costs", | |
//"276":"Printing", | |
"251":"Rent", | |
"289":"Staff Entertaining", | |
"282":"Staff Training", | |
"277":"Stationery", | |
"280":"Sundries", | |
// Admin expenses (Zero-VAT) | |
"363":"Bank/Finance Charges", | |
"359":"Books and Journals", | |
//"360":"Charitable Donations", | |
"372":"Corporation Tax Penalty", | |
"255":"Director's salary", | |
//"294":"Formation Costs", | |
"364":"Insurance", | |
"362":"Interest Payable", | |
"373":"PAYE/NI Penalty", | |
//"351":"Pension (Annuity)", | |
//"350":"Pension (Personal/Stakeholder)", | |
"358":"Postage", | |
"361":"Subscriptions", | |
"365":"Travel", | |
"366":"Use Of Home", | |
//"371":"VAT Penalty", | |
// Cost of Sales | |
"102":"Commission Paid", | |
"101":"Cost of Sales", | |
"104":"Equipment Hire", | |
"103":"Materials", | |
"150":"Subcontractor Costs", | |
// Staff costs | |
"404":"Net Salary Expense", | |
//"405":"PAYE/NI Expense", | |
// Taxes | |
"820":"Corporation Tax", | |
"814":"PAYE/NI" | |
//"817":"VAT" | |
}; | |
$('#spending_category option').each(function(i, e) | |
{ | |
if( ! (e.value in cats) ) | |
{ | |
$(this).remove(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment