if (flightZarfiat($tmp_parvaz) < $tedad) {
        $tedad_ok = FALSE;
    }
    /*		if($tmp_parvaz->getZarfiat($customer->getId())<$tedad)
    			$tedad_ok = FALSE;
    */
    $jam_ghimat += $tedad * $tmp_parvaz->ghimat;
    $jam_ghimat += $inf * $tmp_parvaz->ghimat / 10;
}
$paravaz_tedad = count($tmp) > 0 ? TRUE : FALSE;
$domasire_ok = TRUE;
if (count($tmp) == 1 && (int) $tmp[0] <= 0) {
    $paravaz_tedad = FALSE;
}
foreach ($selectedParvaz as $tmp) {
    $domasire_ok = bargashtHast($selectedParvaz, $tmp) and $domasire_ok;
}
$customer_etebar_ok = TRUE;
$customer_tedad_ok = TRUE;
$customer_shomare_ok = TRUE;
if ($customer_typ != 2 && $customer->max_amount < $jam_ghimat) {
    $customer_etebar_ok = FALSE;
}
if ($customer->max_ticket + 1 - $customer->min_ticket < $tedad) {
    $customer_tedad_ok = FALSE;
}
//---------Flight Selctetion Problems------
$msg = "";
if (!(isset($_REQUEST['mod']) && $_REQUEST['mod'] == 'save') && !$tedad_ok) {
    $msg = "Zarfiate parvaz kam ast";
}
Beispiel #2
0
    //if(flightZarfiat($tmp_parvaz) < $tedad)
    if ($tmp_parvaz->zarfiat < $tedad) {
        $tedad_ok = FALSE;
    }
    $jam_ghimat += $tedad * $tmp_parvaz->ghimat;
    $jam_ghimat += $inf * 200000;
    //($inf * $tmp_parvaz->ghimat)/10;
}
if (!isset($_REQUEST["mod"])) {
    $paravaz_tedad = count($tmp) > 0 ? TRUE : FALSE;
    $domasire_ok = TRUE;
    if (count($tmp) == 1 && (int) $tmp[0] <= 0) {
        $paravaz_tedad = FALSE;
    }
    foreach ($selectedParvaz as $tmp) {
        $bar = bargashtHast($selectedParvaz, $tmp);
        $domasire_ok = $bar && $domasire_ok;
    }
    $customer_etebar_ok = TRUE;
    $customer_tedad_ok = TRUE;
    $customer_shomare_ok = TRUE;
    if (!$isAdmin && $customer->max_amount < $jam_ghimat) {
        $customer_etebar_ok = FALSE;
    }
    if ($customer->max_ticket + 1 - $customer->min_ticket < $tedad) {
        $customer_tedad_ok = FALSE;
    }
    //---------Flight Selctetion Problems------
    $msg = "";
    if (!$tedad_ok) {
        $msg = " ظرفیت پرواز کم است ";