Files
crm.e5.pl/modules/EcmPriceKopias/SavePrice.php

16 lines
931 B
PHP
Raw Normal View History

2024-04-27 09:23:34 +02:00
<?
$sugarEntry=true;
global $db;
function priceToDb($v){
$v=str_replace(".","",$v);
$v=str_replace(",",".",$v);
return floatval($v);
}
$GLOBALS['db']->query("update ecmpricekopias_ecmproducts set recipient_code='".$_REQUEST['recipient_code']."',remarks_pl='".$_REQUEST['remarks_pl']."',remarks_en='".$_REQUEST['remarks_en']."',remarks_de='".$_REQUEST['remarks_de']."',price='".priceToDb($_REQUEST['price'])."' where ecmpricekopia_id='".$_REQUEST['pricebook_id']."' and ecmproduct_id='".$_REQUEST['record']."'");
$_REQUEST['customview_id']=$_COOKIE['customview_id'];
$_GET['customview_id']=$_COOKIE['customview_id'];
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id from ecmpricekopias_ecmproducts where ecmproduct_id='".$_REQUEST['record']."' and ecmpricekopia_id='".$_REQUEST['pricebook_id']."'"));
$_SESSION['EcmPriceKopias_high'][$r['id']]=true;
include("modules/EcmPriceKopias/ListViewProductsAjax.php");
?>