Exemplo n.º 1
0
            if (!isset($bproductObj)) {
                include_once SITE_CLASS_APPLICATION . 'productorganization/class.BProductOrganization.php';
                $bproductObj = new BProductOrganization();
            }
            $product_dtls = $bproductObj->select($rfq2pb2_dtls[0]['iProductId']);
        } else {
            if (isset($rfq2pb2_dtls[0]['ePType']) && $rfq2pb2_dtls[0]['ePType'] == 'SProduct') {
                if (!isset($sproductObj)) {
                    include_once SITE_CLASS_APPLICATION . 'productorganization/class.SProductOrganization.php';
                    $sproductObj = new SProductOrganization();
                }
                $product_dtls = $sproductObj->select($rfq2pb2_dtls[0]['iProductId']);
            }
        }
    }
    $buyer2ids = multi21Array($rfq2pb2_dtls, 'iBuyer2Id');
    $buyer2ids = array_unique($buyer2ids);
    $buyer2ids = array_filter($buyer2ids);
    $b2ids = '';
    if (is_array($buyer2ids) && count($buyer2ids) > 0) {
        $b2ids = @implode(',', $buyer2ids);
    }
    $buyer2_dtls = $orgObj->getDetails('*', " AND iOrganizationID IN ({$b2ids}) ");
    // pr($buyer2_dtls); exit;
}
// pr($product_dtls); exit;
// pr($dtls); exit;
$vreq = 'n';
$permitted = 'n';
$orgprf = $orgprefObj->getDetails('*', " AND iOrganizationID=" . $dtls[0]['iOrganizationID']);
if (($dtls[0]['vStatus_en'] == 'Create' && $orgprf[0]['eRFQ2VerifyReq'] == 'Yes' || $dtls[0]['eDelete'] == 'Yes') && $sess_usertype_short == 'OU') {
Exemplo n.º 2
0
     $oawhr = " AND iUserID!='" . $sess_id . "' AND eStatus='Active' AND eUserType='Admin' AND iOrganizationID='" . $assocs[$l]['iBuyer2Id'] . "' AND eEmailNotification='Yes' ";
     $oadms = $orgUserObj->getDetails('vEmail', $oawhr);
 } else {
     $smgrs = '';
     $smwhr = " AND iSMID!='" . $sess_id . "' AND eEmailNotification='Yes' AND eStatus='Active' ";
     $smgrs = $secManObj->getDetails('vEmail', $smwhr);
 }
 $smemails = '';
 $oaemails = '';
 if (is_array($smgrs) && count($smgrs) > 0) {
     $sm_emails = multi21Array($smgrs, 'vEmail');
     $sm_emails = array_filter($sm_emails);
     $smemails = @implode(',', $sm_emails);
 }
 if (is_array($oadms) && count($oadms) > 0) {
     $oa_emails = multi21Array($oadms, 'vEmail');
     $oa_emails = array_filter($oa_emails);
     $oaemails = @implode(',', $oa_emails);
 }
 //
 if (!isset($sendMail)) {
     include_once SITE_CLASS_GEN . "class.sendmail.php";
     $sendMail = new SendPHPMail();
 }
 if (trim($smemails) != '') {
     $user = '******';
     $body_arr = array("#USER#", "#BUYER2#", "#BUYER#", "#ACODE#", "#LINK#", "#MODIFIED_BY#", "#MAIL_FOOTER#", "#SITE_URL#");
     $post_arr = array($user, $assocs[$l]['vBuyer2'], $assocs[$l]['vBuyer'], $assocs[$l]['vACode'], $link, $sess_user_name . "({$sess_usertype_short})", $MAIL_FOOTER, SITE_URL_DUM);
     $sendMail->Send($esubtyp, "Member", $smemails, $body_arr, $post_arr);
 }
 if (trim($oaemails) != '') {
Exemplo n.º 3
0
$aworgsts = @explode(',', $orgawsts[0]['vRFQ2AwardAcceptLevel']);
// $award = $award[0];
//pr($sts);EXIT;
// prints($award);exit;
$smarty->assign("award", $award);
$smarty->assign("aworgsts", $aworgsts);
$smarty->assign("latestaward", $latestaward);
$smarty->assign("resbid", $totalbids);
$smarty->assign("bidstatistic", $bidstatistic);
$latestrfq2 = $r2bdobj->getB2Orgrfq2($curORGID);
//prints($latestrfq2);exit;
$smarty->assign("latestrfq2", $latestrfq2);
$bidstats = $r2bdobj->getB2BidStats($curORGID);
$bsts = array('current', 'outbidded', 'awarded');
// pr($bsts);exit;
$b2sts = @multi21Array($bidstats, 'eStatus');
$smarty->assign("bsts", $bsts);
$smarty->assign("b2sts", $b2sts);
$smarty->assign("bidstats", $bidstats);
// pr($b2sts); exit;
$r2acptsts = $statusmasterObj->getDetails('iStatusID', " AND vForAuction!='' AND vStatus_en='Accepted' ");
//pr($r2acptsts);
$StatusID = $r2acptsts[0]['iStatusID'];
$getRfq2count = $r2bdobj->getRfq2Awardlist($curORGID, $StatusID);
// pr($getRfq2count);
$getRfq2countarr = array();
for ($i = 0; $i < count($getRfq2count); $i++) {
    if ($getRfq2count[$i]['eAuctionStatus'] == "Live") {
        $getRfq2countarr['Live'] = $getRfq2count[$i]['cnt'];
    } elseif ($getRfq2count[$i]['eAuctionStatus'] == "Completed") {
        $getRfq2countarr['Completed'] = $getRfq2count[$i]['cnt'];
Exemplo n.º 4
0
 if (count($rfq2awardacptstsdflvl) > 0) {
     $rfq2awardacptstsdflvl = @implode(',', $rfq2awardacptstsdflvl);
 } else {
     $rfq2awardacptstsdflvl = '';
 }
 //
 $Data['vRFQ2AwardAcceptPermits'] = $rfq2awardacptstsdflvl;
 if (is_array($_POST['eRfq2Bid']) && count($_POST['eRfq2Bid']) > 0) {
     $Data['vRFQ2BidPermits'] = @implode(',', $_POST['eRfq2Bid']);
 }
 //
 $rfq2awardstsdflvl = array();
 // $rfq2awardstsdflvl = $statusmasterObj->getDetails('iStatusID'," AND vForAuction Like '%RFQ2 Award,%' AND (eType='Default' OR vStatus_en IN ('Rejected')) "); 	// 'Create','Verify'
 $rfq2awardstsdflvl = $statusmasterObj->getDetails('iStatusID', " AND vForAuction Like '%RFQ2 Award,%' AND vStatus_en IN ('Rejected') ");
 // 'Create','Verify'
 $rfq2awardstsdflvl = multi21Array($rfq2awardstsdflvl, 'iStatusID');
 if (isset($_POST['eRfq2Award']) && is_array($_POST['eRfq2Award']) && count($_POST['eRfq2Award']) > 0) {
     $rfq2awardstsdflvl = array_merge($rfq2awardstsdflvl, $_POST['eRfq2Award']);
 }
 // pr($rfq2awardstsdflvl); exit;
 @sort($rfq2awardstsdflvl);
 if (count($rfq2awardstsdflvl) > 0) {
     $rfq2awardstsdflvl = @implode(',', $rfq2awardstsdflvl);
 } else {
     $rfq2awardstsdflvl = '';
 }
 //
 $Data['vRFQ2AwardPermits'] = $rfq2awardstsdflvl;
 if (is_array($_POST['eRfq2']) && count($_POST['eRfq2']) > 0) {
     $Data['vRFQ2Permits'] = @implode(',', $_POST['eRfq2']);
 }
Exemplo n.º 5
0
 function getInvoiceRfq2Buyer2OrgIds($id)
 {
     $sql = "Select iOrganizationID from " . PRJ_DB_PREFIX . "_organization_master org INNER JOIN " . PRJ_DB_PREFIX . "_rfq2_product_buyer2 rpb2 on org.iOrganizationID=rpb2.iBuyer2Id where rpb2.iRFQ2Id=(Select iRFQ2Id from " . PRJ_DB_PREFIX . "_rfq2_master where iInvoiceId={$id} ORDER BY iRFQ2Id DESC LIMIT 0,1) ";
     $ids = $this->_obj->MySQLSelect($sql);
     $ids = @multi21Array($ids, 'iOrganizationID');
     return $ids;
 }
Exemplo n.º 6
0
// -----------------------------------------------------------------------------------------------------------
// prints($orgbyusrvrfy); exit;
$oadDetail = $orgUserObj->getDetails('tDashboard', ' AND iUserID = "' . $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'] . '" ', '', '', '');
$tDashboard = $oadDetail[0]['tDashboard'];
$smarty->assign("tDashboard", $tDashboard);
// -----------------------------------------------------------------------------------------------------------
$rfq2sts = $statusmasterObj->getDetails(" DISTINCT iStatusID, vStatus_en, vStatus_fr, vStatus_" . LANG . " as vStatus ", " AND vForAuction LIKE '%RFQ2%'");
// pr($rfq2sts); exit;
$r2stats = $orgUserObj->getOrgRFQ2($curORGID);
//prints($r2stats);exit;
$latestrfq2 = $r2bdobj->getOrgrfq2($curORGID);
// prints($latestrfq2);exit;
$award = $rfq2awardObj->getaward($curORGID);
// pr($award);exit;
$orgawsts = $orgprefObj->getDetails('vRFQ2AwardStatusLevel', " AND iOrganizationID={$curORGID} ");
$aworgsts = array();
$aworgsts = @explode(',', $orgawsts[0]['vRFQ2AwardStatusLevel']);
$rfq2stats = $r2bdobj->getRFQ2Stats($curORGID);
$cntsts = $gdbobj->mysqlEnumValues(PRJ_DB_PREFIX . "_rfq2_master", 'eAuctionStatus');
$cntsts[] = 'Awarded';
$r2sts = @multi21Array($rfq2stats, 'eAuctionStatus');
//pr($r2sts);exit;
//pr($rfq2stats); exit;
$smarty->assign("r2sts", $r2sts);
$smarty->assign("cntsts", $cntsts);
$smarty->assign("rfq2stats", $rfq2stats);
$smarty->assign("aworgsts", $aworgsts);
$smarty->assign("latestrfq2", $latestrfq2);
$smarty->assign("rfq2sts", $rfq2sts);
$smarty->assign("r2stats", $r2stats);
$smarty->assign("award", $award);
Exemplo n.º 7
0
 function getCurrentBestBid($rfq2id)
 {
     $bestbid_id = 0;
     $sql = "Select * from " . PRJ_DB_PREFIX . "_rfq2_bids where iRFQ2Id={$rfq2id} AND eStatus='current'";
     $dtls = $this->_obj->MySQLSelect($sql);
     $len = @count($dtls);
     if (is_array($dtls) && $len > 0) {
         if ($len == 1) {
             $bestbid_id = $dtls[0]['iBidId'];
         } else {
             if ($len > 1) {
                 $vl_ary = @multi21Array($dtls, 'fBidAmount');
                 $mxvl = max($vl_ary);
                 for ($l = 0; $l < $len; $l++) {
                     if ($mxvl == $dtls[0]['fBidAmount']) {
                         $bestbid_id = $dtls[0]['iBidId'];
                     }
                 }
             }
         }
     }
     // pr($bestbid_id); exit;
     return $bestbid_id;
 }