daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. function getTvaKey($siren)
  4. {
  5.     return (12+3*(intval($siren) % 97))%97;
  6.  
  7. }
  8. function getTvaCode($siren)
  9. {
  10.     return "FR".getTvaKey($siren).$siren;
  11. }
  12.  
  13. $siren=$argv[1];
  14. echo "Cacul Numero TVA:\n";
  15. echo "-----------------\n";
  16. echo "SIREN   : ".$siren."\n";
  17. echo "CLE TVA : ".getTvaKey($siren)."\n";
  18. echo "CODE TVA: ".getTvaCode($siren)."\n";
  19. ?>
RAW Paste Data
Top