init
This commit is contained in:
19
modules/EcmPaymentStates/inv_check.php
Normal file
19
modules/EcmPaymentStates/inv_check.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
include_once("config.php");
|
||||
|
||||
$sql=mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
|
||||
mysql_select_db($sugar_config['dbconfig']['db_name']);
|
||||
|
||||
mysql_query("set character set utf8;");
|
||||
|
||||
$zap=mysql_query("select document_no,payment_date,id,pdf_total,parent_id from ecminvoiceouts where payment_date > '2011-12-31'
|
||||
order by payment_date asc");
|
||||
while($dane=mysql_fetch_assoc($zap)){
|
||||
$check=mysql_query("select id,name from ecmtransactions where value='".$dane['pdf_total']."' and parent_id='".$dane['parent_id']."' and type=0");
|
||||
echo $dane['document_no'].":<br>";
|
||||
while($r=mysql_fetch_assoc($check)){
|
||||
if($dane['document_no']!=$r['name'])echo $r['id']." ".$r['name']."<br>";
|
||||
}
|
||||
|
||||
}
|
||||
echo mysql_num_rows($zap);
|
||||
Reference in New Issue
Block a user