示例#1
0
                header("Location: " . SITE_URL_DUM . "purchaseorderview/{$iPurchaseOrderID}");
                exit;
            }
        }
    }
    if ($curORGID == $podtls[0]['iSupplierOrganizationID']) {
        header("Location: " . SITE_URL_DUM . "polist/all");
        exit;
    }
}
if ($iPurchaseOrderID == '' && isset($_SESSION['Data'])) {
    $podtls[0] = $_SESSION['Data'];
    unset($_SESSION['Data']);
}
if ($view != 'edit') {
    $upermits = $orgUserPermObj->getUserPermits($sess_id);
    $stsdtls = $statusmasterObj->getDetails('*', " AND eFor='PO' AND vStatus_en='Create' ");
    $sts = $stsdtls[0]['iStatusID'];
    if (!in_array($sts, $upermits['po'])) {
        header("Location: " . SITE_URL_DUM . "polist/all");
    }
}
$currency = $orgprefObj->getDetails('vCurrency', " AND iOrganizationID={$curORGID}");
if (trim($currency[0]['vCurrency']) != '') {
    $currency = @explode(',', $currency[0]['vCurrency']);
    $currency = @implode("','", $currency);
    //$csql = "Select iCurrencyID,vCode from ".PRJ_DB_PREFIX."_currency_master  where vCode in('".$currency."')";
    $currency = $generalobj->getCurrency("vCode in('" . $currency . "')");
}
//prints($currency);
$elitx = isset($podtls[0]['eLineItemTax']) ? $podtls[0]['eLineItemTax'] : '';
示例#2
0
                   for($l=0; $l<count($orgpostatus); $l++) {
                   if($orgpostatus[$l]['iStatusID'] > $poData['iStatusID'] && in_array($orgpostatus[$l]['iStatusID'],$mth)) {
                   $nxtstatus = $orgpostatus[$l];
                   break;
                   }
                   }
                   } */
            }
        } else {
            $nxtstatus = $acptsts[0];
        }
    }
}
// if($poData['iInvoiceID'] > 0) {
if ($poData['iStatusID'] == $isusts[0]['iStatusID'] && $orgtype != 'Buyer' && $curORGID != $poData['iBuyerOrganizationID']) {
    $upermits = $orgUserPermObj->getUserPermits($sess_id, 'acpt');
} else {
    $upermits = $orgUserPermObj->getUserPermits($sess_id);
}
if (!is_array($upermits['po'])) {
    $upermits['po'] = array();
}
// prints($nxtstatus); exit;
if ($sess_usertype != 'orgadmin') {
    if (isset($nxtstatus['iStatusID'])) {
        if (in_array($nxtstatus['iStatusID'], $upermits['po']) && $sess_usertype_short == 'OU' && $poData['iStatusID'] != $isusts[0]['iStatusID'] && $poData['iStatusID'] != $acptsts[0]['iStatusID'] || $poData['eDelete'] == 'Yes') {
            $permitted = 'Yes';
            /* if($poData['iStatusID']==0 && strpos($ures[0]['eVerify'],'po')===false) {
               $permitted = 'No';
               } */
        } else {