Example #1
0
<?php

if (!isset($b2bpbObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association.php";
    $b2bpbObj = new Buyer2_Buyer_BProduct_Association();
}
if (!isset($b2bpbvObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association_ToVerify.php";
    $b2bpbvObj = new Buyer2_Buyer_BProduct_Association_ToVerify();
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $emailObj = new EmailTemplate();
}
$mod = PostVar('mod');
$admr = PostVar('admr');
$iAssociationId = PostVar('iAssociationId');
$Data = PostVar('Data');
$body_arr = '';
$type = '';
$post_data = $_POST;
if ($mod == 'verify') {
    $dtv = $vasocdt = $b2bpbvObj->getDetails('*', " AND iAssociationId={$iAssociationId} ", ' iVerifiedID DESC ', '', ' LIMIT 0,1');
    $dtv = $dtv[0];
    if (is_array($vasocdt) && count($vasocdt) > 0 && isset($vasocdt[0]['iAssociationId']) && isset($vasocdt[0]['iVerifiedID'])) {
        $dtv['eVerifiedBy'] = $sess_usertype_short;
        $dtv['iVerifiedByID'] = $sess_id;
        $dtv['dVerifiedDate'] = calcGTzTime(date('Y-m-d H:i:s'), 'Y-m-d H:i:s');
        // if(! (($dtv['eStatus']=='Active' || $dtv['eStatus']=='Inactive' || $dtv['eStatus']=='Delete') )) {
        if (!(($dtv['eStatus'] == 'Active' || $dtv['eStatus'] == 'Inactive' || $dtv['eStatus'] == 'Delete') && $dtv['eNeedToVerify'] == 'Yes')) {
            $dtv['eStatus'] = 'Active';
<?php

$mode = PostVar('mode');
$val = PostVar('val');
if (trim($val) == '' || $val < 1 || trim($mode) == '') {
    exit;
}
if (!isset($b2bpbObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association.php";
    $b2bpbObj = new Buyer2_Buyer_BProduct_Association();
}
if (!isset($b2bpbvObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association_ToVerify.php";
    $b2bpbvObj = new Buyer2_Buyer_BProduct_Association_ToVerify();
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $emailObj = new EmailTemplate();
}
$flds = "b2bpb.*, (Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2bpb.iBuyer2Id) as vBuyer2,\r\n\t\t\t\t\t(Select vProductName from " . PRJ_DB_PREFIX . "_bproduct_organization where iProductId=b2bpb.iProductId) as vProduct,\r\n               (Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2bpb.iBuyerId) as vBuyer";
$assocs = $b2bpbObj->getDetails($flds, " AND b2bpb.eStatus IN ('Active','Inactive') AND b2bpb.eNeedToVerify!='Yes' AND b2bpb.iAssociationId IN ({$val}) ");
// pr($assocs); exit;
$assocsids = multi21Array($assocs, 'iAssociationId');
$vl = '';
if (is_array($assocsids) && count($assocsids) > 0) {
    $vl = @implode(',', $assocsids);
}
$rs = false;
$type = '';
$esubtyp = '';
if ($mode == 'status' && trim($vl) != '') {
Example #3
0
<?php

$iAssociationId = GetVar('id');
/*if($sess_usertype == 'orgadmin' && $asoc != $iAssociationId) {
   header("Location: ".SITE_URL_DUM."oadashboard");
   exit;
}*/
if (!isset($b2bpbObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association.php";
    $b2bpbObj = new Buyer2_Buyer_BProduct_Association();
}
if (!isset($b2bpbvObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association_ToVerify.php";
    $b2bpbvObj = new Buyer2_Buyer_BProduct_Association_ToVerify();
}
$b2bprdtls = $b2bpbObj->select($iAssociationId);
$b2bprdthistory = $b2bpbvObj->getHistory($iAssociationId);
// prints($b2bprdthistory); exit;
$smarty->assign('b2bprdtls', $b2bprdtls);
$smarty->assign('b2bprdthistory', $b2bprdthistory);
Example #4
0
<?php

if (!isset($b2bpbObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association.php";
    $b2bpbObj = new Buyer2_Buyer_BProduct_Association();
}
if (!isset($b2bpbvObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association_ToVerify.php";
    $b2bpbvObj = new Buyer2_Buyer_BProduct_Association_ToVerify();
}
$iAssociationId = GetVar('id');
// $msg = GetVar('msg');
$mod = '';
$flds = " b2bpbv.*, org.vCompanyName as vBuyer2, org.vCompCode, bpo.vProductName as vProduct, bpo.vProductCode, bo.vCompanyName as vBuyer, bo.vCompCode as vB2Code ";
$jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_bproduct_organization bpo on bpo.iProductId=b2bpbv.iProductId\r\n            LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2bpbv.iBuyer2Id\r\n            LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master bo on bo.iOrganizationID=b2bpbv.iBuyerId ";
$vb2bprdtls = $b2bpbvObj->getJoinTableInfo($jtbl, $flds, " AND b2bpbv.iAssociationId={$iAssociationId} ", ' b2bpbv.iVerifiedID DESC ', '', ' LIMIT 0,1');
// pr($vb2bprdtls); exit;
$vrq = $b2bpbvObj->isVerifyReq($vb2bprdtls);
$vsts = '';
if ($vrq == 'vreq') {
    $vsts = $b2bpbvObj->chkRecVrf($vb2bprdtls);
    if ($vsts == 'nr' || $vsts == 'om') {
        header('Location: ' . SITE_URL_DUM . 'b2bprodtbasoclist');
        exit;
    }
} else {
    if ($vrq == 'nr') {
        $flds = " b2bpb.*, org.vCompanyName as vBuyer2, org.vCompCode, bpo.vProductName as vProduct, bpo.vProductCode, bo.vCompanyName as vBuyer, bo.vCompCode as vB2Code ";
        $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_bproduct_organization bpo on bpo.iProductId=b2bpb.iProductId\r\n               LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2bpb.iBuyer2Id\r\n               LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master bo on bo.iOrganizationID=b2bpb.iBuyerId ";
        $vb2bprdtls = $b2bpbObj->getJoinTableInfo($jtbl, $flds, " AND iAssociationId={$iAssociationId} ");
        $vrq = $b2bpbvObj->isVerifyReq($vb2bprdtls);
Example #5
0
$code = isset($_POST['code']) ? $_POST['code'] : '';
$product = isset($_POST['product']) ? $_POST['product'] : '';
$buyer = isset($_POST['buyer']) ? $_POST['buyer'] : '';
$stype = isset($_POST['styp']) ? $_POST['styp'] : '';
$page = $_POST['page'];
if (trim($page) == '' || trim($page) < 1) {
    $page = 1;
}
// prints($_POST); exit;
if (!isset($orgObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Organization.php";
    $orgObj = new Organization();
}
if (!isset($assObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Buyer_BProduct_Association_ToVerify.php";
    $assObj = new Buyer2_Buyer_BProduct_Association_ToVerify();
}
$where = "";
$_POST['srchval'] = isset($_POST['srchval']) ? $_POST['srchval'] : '';
if ($_POST['srchval'] == 'act') {
    $where .= " AND b2bpbv.eStatus='Active' ";
} else {
    if ($_POST['srchval'] == 'inact') {
        $where .= " AND b2bpbv.eStatus='Inactive' ";
    }
}
if ($mode == 'all') {
    if ($val != '') {
        $where = " AND ((Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2bpbv.iBuyer2Id) LIKE '%{$val}%' OR\r\n\t\t\t\t\t\t(Select vProductName from " . PRJ_DB_PREFIX . "_bproduct_organization where iProductId=b2bpbv.iProductId) LIKE '%{$val}%' OR\r\n\t\t\t\t\t\t(Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2bpbv.iBuyerId) LIKE '%{$val}%'\r\n\t\t\t\t\t\tOR vACode LIKE '%{$val}%' )";
    }
    // echo $where; exit;