Files
crm.e5.pl/modules/EcmReports/setValRep.php
2024-04-27 09:23:34 +02:00

10 lines
740 B
PHP
Executable File

<?php
if($_REQUEST['account_id']){
$acc=" account_id='".$_REQUEST['account_id']."' and ";
}
else $acc="";
mysql_query("delete from ecmsalesreports_predictions_cat where ".$acc."bean_id='".$_REQUEST['bean_id']."' and month='".$_REQUEST['month']."' and year='".$_REQUEST['year']."' and type='".$type."'");
mysql_query("insert into ecmsalesreports_predictions_cat values('".create_guid()."','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','".$_SESSION['authenticated_user_id']."','".$_SESSION['authenticated_user_id']."','".$_REQUEST['year']."','".$_REQUEST['month']."','".$_REQUEST['account_id']."','".$_REQUEST['bean_id']."','".$_REQUEST['value']."','0','".$_REQUEST['type']."');");
echo number_format($_REQUEST['value'],2,",",".");
?>