if(isset($_POST['getSizesForArticle'])){ require_once(ROOT."/libs/php/classes/rt_class.php"); echo RT::getSizesForArticle($_POST['pos_id']); exit; } if(isset($_GET['getSpecificationsDates'])){ require_once(ROOT."/libs/php/classes/agreement_class.php"); echo Agreement::getSpecificationsDates(json_decode($_GET['getSpecificationsDates'])); exit; } if(isset($_GET['save_rt_changes'])){ //print_r(json_decode($_GET['save_rt_changes'])); RT::save_rt_changes(json_decode($_GET['save_rt_changes'])); exit; } if(isset($_GET['change_quantity'])){ // echo $_GET['quantity']; // проверяем есть ли размеры у позиции если есть дальше не идем и отдаем оповещение if(isset($_GET['source']) && $_GET['source']=='rt'){ if(RT::checkPosAboutSizes($_GET['id'])==true){ echo '{"warning":"size_exists"}'; exit; } } RT::change_quantity($_GET['quantity'],$_GET['id'],$_GET['source']); exit;