Created
August 30, 2015 20:17
-
-
Save hackenbruder/9313b37361efab6391d5 to your computer and use it in GitHub Desktop.
Příklad použití GovData Javascript SDK
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
GovData.findEntityByNumber('00006947', | |
function(entity) { | |
console.info('Název:', entity.getName()); | |
if(entity.hasVAT()) { | |
console.info('Je plátcem DPH.'); | |
var vat = entity.getVAT(); | |
if(vat.hasAccounts()) { | |
var accounts = vat.getAccounts(); | |
for(var i = 0; i < accounts.length; ++i) { | |
console.info('Účet:', accounts[i].toString()); | |
} | |
} else { | |
console.info('Nemá nahlášené bankovní účty.'); | |
} | |
} else { | |
console.info('Není plátcem DPH.'); | |
} | |
}, | |
function(error) { | |
console.error(error.toString()); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment