Add php files
This commit is contained in:
11
modules/Accounts/checkNIP.php
Normal file
11
modules/Accounts/checkNIP.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
if (!$_REQUEST['nip'] || trim($_REQUEST['nip'])=="") return;
|
||||
|
||||
$nip = trim($_REQUEST['nip']);
|
||||
$unip = str_replace('-', '', trim($_REQUEST['nip']));
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$r = $db->query("SELECT id FROM accounts WHERE to_vatid='$nip' OR to_vatid_unformated='$unip' AND deleted='0'");
|
||||
echo $r->num_rows;
|
||||
return;
|
||||
Reference in New Issue
Block a user