} $bascetsum = $bascetsum - $discountcoupon; if ($bascetsum < 0) { $bascetsum = 0; } $bascetweight = $rows["myweight"]; $mymaterialtype = $bascetsum > 0 ? $rows["mymaterialtype"] : 1; //вычисляем для страховок $suminsurance = $order_class->getSuminsurance(); if ($suminsurance > 0) { $bascetinsurance = $suminsurance * 0.04; } else { $bascetinsurance = $bascetsum * 0.04; } $bascetamount = $orderdetails_class->getCounter(); $postcounter = $orderdetails_class->getPaking(); if ($postcounter) { $bascetpostweight = $bascetweight + $WeightPostBox; } else { $bascetpostweight = $bascetweight + $WeightPostLatter; } $PostZoneNumber = 0; $rows = $orderdetails_class->getPost($postindex); if ($postindex) { //тариф по зоне обслуживания //select * from Post where PostIndex='600023'; $PostZoneNumber = $rows["PostZone"]; $PostRegion = $rows["Region"] ? $rows["Region"] : $rows["Autonom"]; $PostCity = $rows["City"] ? $rows["City"] : $PostRegion; } if (!$PostZoneNumber) {