コード例 #1
0
ファイル: aj_b2rfq2awardlist.php プロジェクト: nstungxd/F2CA5
        $cursort_type = 'DESC';
    }
    if (strpos($cursort, ',') !== false) {
        $cursort = str_replace(",", " {$cursort_type}, ", $cursort);
    }
    $orderBy = " {$cursort} {$cursort_type}";
} else {
    $orderBy = " r2bd.dBidDate DESC ";
}
## ENDS HERE ###
$limit = " LIMIT " . ($page - 1) * $REC_LIMIT_FRONT . ", " . $REC_LIMIT_FRONT . " ";
$jtbl = "INNER JOIN " . PRJ_DB_PREFIX . "_rfq2_bids r2bd on r2bd.iRFQ2Id=r2aw.iRFQ2Id\r\n\t\t\t\t\tINNER JOIN " . PRJ_DB_PREFIX . "_rfq2_master rfq2 on rfq2.iRFQ2Id=r2bd.iRFQ2Id\r\n\t\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_inovice_order_heading ioh on rfq2.iInvoiceID=ioh.iInvoiceID\r\n                                        LEFT JOIN " . PRJ_DB_PREFIX . "_purchase_order_heading poh on rfq2.iPurchaseOrderID=poh.iPurchaseOrderID\r\n\t\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_status_master sm on sm.iStatusID=r2aw.iaStatusID\r\n\t\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_rfq2_product_buyer2 rpb2 on rpb2.iRFQ2Id=rfq2.iRFQ2Id\r\n\t\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=r2bd.iBuyer2Id";
$where .= " AND r2bd.eSaved!='Yes' AND r2bd.eStatus NOT IN ('pending','rejected') ";
$where .= " AND r2bd.eDelete!='Verified' ";
$fields = " DISTINCT r2aw.iAwardId, r2bd.*, rfq2.*, IF(rfq2.eFrom='Invoice',ioh.vInvoiceCode,poh.vPOCode) as vInvoiceCode, IF(rfq2.eFrom='Invoice',ioh.fAcceptedAmount,poh.fPOTotal) as fAcceptedAmount, IF(rfq2.eFrom='Invoice',ioh.vBuyerName,poh.vBuyerCompanyName) as vBuyerName, IF(rfq2.eFrom='Invoice',ioh.vSupplierName,poh.vSupplierName) as vSupplierName, sm.vStatus_" . LANG . " as eStatus, r2aw.eSaved, r2aw.eDelete, org.vCompanyName as vBuyer2,\r\n\t\t\t\t\tIF(rpb2.ePType='BProduct',(Select vProductName from " . PRJ_DB_PREFIX . "_bproduct_organization where iProductId=rpb2.ePType), (Select vProductName from " . PRJ_DB_PREFIX . "_sproduct_organization where iProductId=rpb2.ePType) ) as vProductName ";
$dtls = $r2awObj->getJoinTableInfo($jtbl, $fields, $where, $orderBy, 'r2aw.iAwardId' . $having, $limit, 'yes');
// pr($dtls); exit;
$count = $dtls['tot'];
unset($dtls['tot']);
if (!isset($pgajxobj)) {
    require_once SITE_CLASS_GEN . "class.paging-ajax.php";
    $pgajxobj = new Paging($count, $page, "listrfq2award", $REC_LIMIT_FRONT);
}
$paging = $pgajxobj->getListPG($page);
$pgmsg = $pgajxobj->setMessage("Records");
//echo $paging; exit;
$smarty->assign('dtls', $dtls);
$smarty->assign('isusts', $isusts);
$smarty->assign('count', $count);
$smarty->assign('paging', $paging);
$smarty->assign('pgmsg', $pgmsg);
コード例 #2
0
ファイル: rfq2awardview.php プロジェクト: nstungxd/F2CA5
if (!isset($orgprefObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.OrganizationPreference.php";
    $orgprefObj = new OrganizationPreference();
}
if (!isset($orgUserPermObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.OrganizationUserPermission.php";
    $orgUserPermObj = new OrganizationUserPermission();
}
if (!isset($statusmasterObj)) {
    include_once SITE_CLASS_APPLICATION . "class.StatusMaster.php";
    $statusmasterObj = new StatusMaster();
}
$iAwardId = GetVar('id');
$jtbl = " INNER JOIN " . PRJ_DB_PREFIX . "_rfq2_master rfq2 on r2aw.iRFQ2Id=rfq2.iRFQ2Id\r\n            INNER JOIN " . PRJ_DB_PREFIX . "_rfq2_bids r2bd ON r2bd.iBidId=r2aw.iBidId\r\n            LEFT JOIN " . PRJ_DB_PREFIX . "_inovice_order_heading ih ON rfq2.iInvoiceID=ih.iInvoiceID\r\n                LEFT JOIN " . PRJ_DB_PREFIX . "_purchase_order_heading ph ON rfq2.iPurchaseOrderID=ph.iPurchaseOrderID\r\n\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_status_master sm ON sm.iStatusID=r2aw.iStatusID\r\n\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org ON org.iOrganizationID=r2bd.iBuyer2Id";
$where = " AND r2aw.iAwardId={$iAwardId} ";
$bdtls = $rfq2awObj->getJoinTableInfo($jtbl, " DISTINCT *, ih.iInvoiceID,ph.vPOCode, r2aw.iAwardId, rfq2.iOrganizationID, org.vCompanyName as vBuyer2, r2aw.iStatusID, r2aw.iaStatusID, sm.vStatus_en as status, sm.vStatus_" . LANG . " as eStatus, r2aw.eSaved, r2aw.eDelete, r2aw.iModifiedById ", "{$where}", "", "", "", "");
// pr($bdtls); exit;
if (!(is_array($bdtls) && count($bdtls) > 0) || trim($bdtls[0]['iBidId']) == '' || $bdtls[0]['iBidId'] < 1 || trim($bdtls[0]['iRFQ2Id']) == '' || $bdtls[0]['iRFQ2Id'] < 1) {
    header("Location: " . SITE_URL_DUM . "rfq2awardlist");
    exit;
}
// pr($bdtls); exit;
$rfq2bidfiles = $r2bdflObj->getDetails("*", " AND iBidId=" . $bdtls[0]['iBidId']);
if (is_array($rfq2bidfiles) && count($rfq2bidfiles) > 0) {
    for ($l = 0; $l < count($rfq2bidfiles); $l++) {
        if (is_file($cfgimg['rfq2bid']['docs']['path'] . $rfq2bidfiles[$l]['iBidId'] . '/' . $rfq2bidfiles[$l]['vFile'])) {
            $bidfiles = $rfq2bidfiles[$l]['vFile'];
            $no = strpos($bidfiles, "_", "_");
            $bidfiles = substr($bidfiles, $no + 1);
            $no = strpos($bidfiles, "_", "_");
            $bidfiles = substr($bidfiles, $no + 1);
コード例 #3
0
ファイル: rfq2awardverify_a.php プロジェクト: nstungxd/F2CA5
if (!isset($userActionObj)) {
    include_once SITE_CLASS_APPLICATION . 'user/class.UserActionVerification.php';
    $userActionObj = new UserActionVerification();
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $emailObj = new EmailTemplate();
}
if (!isset($sendMail)) {
    include SITE_CLASS_GEN . "class.sendmail.php";
    $sendMail = new SendPHPMail();
}
// record details before verify
$jtbl = " INNER JOIN " . PRJ_DB_PREFIX . "_rfq2_master rfq2 on r2aw.iRFQ2Id=rfq2.iRFQ2Id\r\n            INNER JOIN " . PRJ_DB_PREFIX . "_rfq2_bids r2bd ON r2bd.iBidId=r2aw.iBidId\r\n            LEFT JOIN " . PRJ_DB_PREFIX . "_inovice_order_heading ih ON rfq2.iInvoiceID=ih.iInvoiceID\r\n                LEFT JOIN " . PRJ_DB_PREFIX . "_purchase_order_heading ph ON rfq2.iPurchaseOrderID=ph.iPurchaseOrderID\r\n\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_status_master sm ON sm.iStatusID=r2aw.iStatusID\r\n\t\t\t\tLEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org ON org.iOrganizationID=r2bd.iBuyer2Id";
$where = " AND r2aw.iAwardId={$iAwardId} ";
$prv_dtls = $rfq2awObj->getJoinTableInfo($jtbl, " DISTINCT *, IF(rfq2.eFrom = 'Invoice',ih.iBuyerOrganizationID,ph.iBuyerOrganizationID) as iBuyerOrganizationID, IF(rfq2.eFrom = 'Invoice',ih.iSupplierOrganizationID,ph.iSupplierOrganizationID) as iSupplierOrganizationID, IF(rfq2.eFrom = 'Invoice',ih.vCurrency,ph.vCurrency) as vCurrency, r2aw.iAwardId, rfq2.iOrganizationID, org.vCompanyName as vBuyer2, r2aw.iStatusID, r2aw.iaStatusID, sm.vStatus_en as status, sm.vStatus_" . LANG . " as eStatus, r2aw.eSaved, r2aw.eDelete, r2aw.iModifiedById ", "{$where}", "", "", "", "");
if (!(is_array($prv_dtls) && count($prv_dtls) > 0)) {
    header("Location: " . SITE_URL_DUM . "rfq2awardlist");
    exit;
}
// get next status and check for user permission as per organization
$permitted = 'n';
if ($prv_dtls[0]['iModifiedById'] != $sess_id && $prv_dtls[0]['iOrganizationID'] == $curORGID) {
    $rfq2vp = $orgUserPermObj->getUserR2Permits($sess_id, "%RFQ2 Award,%", "vRFQ2AwardPermits");
    $onp = $orgprefObj->getNextStatus($curORGID, $prv_dtls[0]['iStatusID'], "vRFQ2AwardStatusLevel", 'y');
    $nsts = key($onp);
    #if($prv_dtls[0]['iStatusID'] == $asts) { $vreq = 'n'; }
    if (isset($rfq2vp[$onp[$nsts]]) && $rfq2vp[$onp[$nsts]] == 'y') {
        $permitted = 'y';
    }
} else {