/** * Created by Pensare Software. * User: Theo Weijmer * Date: 23/01/2018 * Time: 19:33 */ dbo.vatDataService = { getVats: function ( archive = 'F', callback ) { $.getJSON( 'index.php/beheer/vatController/getVats/' + archive ) .done( function ( data ) { callback( data ); } ); }, addVat: function ( callback ) { $.get( 'index.php/beheer/vatController/addVat' ) .done( function () { callback(); } ); }, saveVat: function ( vatID, vatrate ) { $.post( 'index.php/beheer/vatController/saveVat/' + vatID, {vatrate: vatrate} ); }, removeVat: function ( vatID, callback ) { $.getJSON( 'index.php/beheer/vatController/removeVat/' + vatID ) .done( function (data) { callback(data); } ); } }