{"id":4026,"date":"2023-01-13T16:22:07","date_gmt":"2023-01-13T16:22:07","guid":{"rendered":"https:\/\/www.studiojente-projecten.nl\/swier\/collection-fee-calculator\/"},"modified":"2023-03-07T20:03:09","modified_gmt":"2023-03-07T20:03:09","slug":"collection-fee-calculator","status":"publish","type":"page","link":"https:\/\/www.swiercs.nl\/en\/collection-fee-calculator\/","title":{"rendered":"Collection fee calculator"},"content":{"rendered":"\n<p>As of July 1, 2012, the law standardizing extrajudicial collection costs came into effect. As of this date, in the final demand letter to your customer, you are not only required to use a 14-day payment term, but you are also required to state the maximum amount that will be charged in collection costs if payment is not made within the 14 days. If you cannot offset VAT, the collection costs will be increased by the amount of VAT.<\/p>\n\n<form>\n    <table class=\"calculatorForm\">\n        <tr><td class=\"description\">Amount to be claimed<\/td><td><input id=\"teVorderenBedrag\" class=\"right\" size=\"12\"\/><\/td><\/tr>\n    <\/table>\n    <table class=\"calculatorForm\">\n        <tr><td colspan=\"2\"><b>Maximum collection costs<\/b><\/td><\/tr>\n        <tr><td class=\"description\">Excluding 21% VAT<\/td><td><input id=\"exclusiefBTW\" disabled=\"disabled\" size=\"12\"\/><\/td><\/tr>\n        <tr><td class=\"description\">Including 21% VAT<\/td><td><input id=\"inclusiefBTW\" disabled=\"disabled\" size=\"12\"\/><\/td><\/tr>\n    <\/table>\n    <br\/>\n    <button class=\"calculate\" onclick=\"  if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; }\">Calculate<\/button>\n    <\/form>\n    \n <br\/>\n\n    <div id=\"bulk-calculator\">\n        <h2>Bulk calculation<\/h2>\n        <p>\n  You can also upload a CSV file to perform a bulk calculation. Here you are given the choice of which column to apply the calculation to.\n        <\/p>\n        <div class=\"input\">\n            <div class=\"file-select\">\n                <label for=\"csv-file\">File<\/label>\n                <input type=\"file\" id=\"csv-file\"\/>\n            <\/div>\n            <div class=\"header-select\" style=\"display: none;\">\n                <label for=\"csv-header-select\">Column<\/label>\n                <select id=\"csv-header-select\">\n                    <option value=\"\">Choose an option<\/option>\n                <\/select>\n            <\/div>\n\n            <table id=\"csv-processed-data\" style=\"display: none;\">\n                <thead>\n                <tr>\n                    <th><\/th>\n                    <th colspan=\"2\" style=\"text-align: center;\">Maximum collection costs<\/th>\n                <\/tr>\n                <tr>\n                    <th>Amount to be claimed<\/th>\n                    <th>Excluding 21% VAT<\/th>\n                    <th>Including 21% VAT<\/th>\n                <\/tr>\n                <\/thead>\n                <tbody><!-- Leave Empty <3 --><\/tbody>\n            <\/table>\n        <\/div>\n    <\/div>\n\n    <script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/2.1.3\/jquery.min.js\"><\/script>\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery-csv\/0.71\/jquery.csv-0.71.min.js\"><\/script>\n    <script>\n        jQuery(document).ready(function() {\n            var lines = [];\n\n            jQuery('#csv-file').change(function () {\n                var file = jQuery(this)[0].files[0];\n\n                if (!file) {\n                    return;\n                }\n\n                var fileReader = new FileReader();\n                fileReader.onload = fileRead;\n\n                fileReader.readAsDataURL(file);\n            });\n\n            jQuery('#csv-header-select').change(function () {\n                createTable(lines);\n            });\n\n            function calculateCosts(amount) {\n                var costs = 0;\n\n                if (amount <= 2500) { costs = amount * 0.15; } if (amount> 2500 && amount <= 5000) { costs += 375; costs += ((amount - 2500) \/ 100) * 10; } if (amount> 5000 && amount <= 10000) { costs += 625; costs += ((amount - 5000) \/ 100) * 5; } if (amount> 10000 && amount <= 200000) { costs += 875; costs += ((amount - 10000) \/ 100); } if (amount> 200000) {\n                    costs += 2775;\n                    costs += ((amount - 200000) \/ 100) * 0.5;\n                }\n\n                if (costs <40){ costs = 40; } if (costs> 6775){\n                    costs = 6775;\n                }\n\n                return costs;\n            }\n\n            function fileRead(fileReader)\n            {\n                var base64 = fileReader.target.result.split('base64,');\n                var fileContents = atob(base64[1]);\n\n                processData(fileContents);\n            }\n\n            function processData(allText) {\n                var allTextLines = allText.split(\/\\r\\n|\\n\/);\n                var headers = allTextLines[0].split(';');\n\n                fillHeaderSelect(headers);\n\n                for (var i = 1; i <allTextLines.length; i++) { var data = allTextLines[i].split(';'); if (data.length === headers.length) { var tarr = []; for (var j = 0; j <headers.length; j++) { tarr.push(data[j]); } lines.push(tarr); } } } function fillHeaderSelect(options) { jQuery('#csv-header-select option').remove(); jQuery('#csv-header-select').append('<option value=\"\">Selecteer een kolom');\n                jQuery(options).each(function (i, e) {\n                    jQuery('#csv-header-select').append('<option value=\"'+i+'\">'+e+'');\n                });\n\n                jQuery('.header-select').show();\n            }\n\n            function createTable(rows)\n            {\n                jQuery('#csv-processed-data tbody tr').remove();\n\n                var selectedColumn = jQuery('#csv-header-select option:selected').val();\n\n                jQuery(rows).each(function (i, e) {\n\n                    var costs = calculateCosts(e[selectedColumn].replace(',', '.'));\n                    jQuery('#csv-processed-data tbody').append('<tr><td>'+e[selectedColumn]+'<td>'+costs.toFixed(2)+'<td>'+(costs * 1.21).toFixed(2)+'<tr>');\n                });\n\n                jQuery('#csv-processed-data').show();\n            }\n\n            jQuery(\".calculate\").click(function() {\n\n                var amount = $(\"#teVorderenBedrag\").val().replace(',', '.');\n\n                var costs = calculateCosts(amount);\n\n                jQuery('#exclusiefBTW').val(costs.toFixed(2));\n                jQuery('#inclusiefBTW').val((costs * 1.21).toFixed(2));\n            });\n        });\n\t<\/script>\n","protected":false},"excerpt":{"rendered":"<p>As of July 1, 2012, the law standardizing extrajudicial collection costs came into effect. As of this date, in the final demand letter to your customer, you are not only required to use a 14-day payment term, but you are also required to state the maximum amount that will be charged in collection costs if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3881,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-4026","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/pages\/4026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/comments?post=4026"}],"version-history":[{"count":2,"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/pages\/4026\/revisions"}],"predecessor-version":[{"id":4034,"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/pages\/4026\/revisions\/4034"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/media\/3881"}],"wp:attachment":[{"href":"https:\/\/www.swiercs.nl\/en\/wp-json\/wp\/v2\/media?parent=4026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}