示例#1
0
$buyer2 = isset($_POST['buyer2']) ? $_POST['buyer2'] : '';
$code = isset($_POST['code']) ? $_POST['code'] : '';
$supplier = isset($_POST['supplier']) ? $_POST['supplier'] : '';
$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_Supplier_Association_ToVerify.php";
    $assObj = new Buyer2_Supplier_Association_ToVerify();
}
$where = "";
$_POST['srchval'] = isset($_POST['srchval']) ? $_POST['srchval'] : '';
if ($_POST['srchval'] == 'act') {
    $where .= " AND b2sav.eStatus='Active' ";
} else {
    if ($_POST['srchval'] == 'inact') {
        $where .= " AND b2sav.eStatus='Inactive' ";
    }
}
if ($mode == 'all') {
    if ($val != '') {
        $where = " AND ((Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2sav.iBuyer2Id) LIKE '%{$val}%' OR\r\n\t\t\t\t\t\t(Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2sav.iSupplierId) LIKE '%{$val}%' OR vACode LIKE '%{$val}%' )";
    }
    // echo $where; exit;
<?php

$mode = PostVar('mode');
$val = PostVar('val');
if (trim($val) == '' || $val < 1 || trim($mode) == '') {
    exit;
}
if (!isset($b2saObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association.php";
    $b2saObj = new Buyer2_Supplier_Association();
}
if (!isset($b2savObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association_ToVerify.php";
    $b2savObj = new Buyer2_Supplier_Association_ToVerify();
}
if (!isset($emailObj)) {
    include_once SITE_CLASS_APPLICATION . 'class.EmailTemplate.php';
    $emailObj = new EmailTemplate();
}
$flds = "b2sa.*, (Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2sa.iBuyer2Id) as vBuyer2,\r\n\t\t\t\t\t(Select vCompanyName from " . PRJ_DB_PREFIX . "_organization_master where iOrganizationID=b2sa.iSupplierId) as vSupplier";
$assocs = $b2saObj->getDetails($flds, " AND b2sa.eStatus IN ('Active','Inactive') AND b2sa.eNeedToVerify!='Yes' AND b2sa.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) != '') {
示例#3
0
<?php

if (!isset($b2saObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association.php";
    $b2saObj = new Buyer2_Supplier_Association();
}
if (!isset($b2savObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association_ToVerify.php";
    $b2savObj = new Buyer2_Supplier_Association_ToVerify();
}
$iAssociationId = GetVar('id');
// $msg = GetVar('msg');
$mod = '';
$flds = " b2sav.*, org.vCompanyName as vBuyer2, org.vCompCode, so.vCompanyName as vSupplier, so.vCompCode ";
$jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master so on so.iOrganizationID=b2sav.iSupplierId\r\n            LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2sav.iBuyer2Id ";
$vb2spdtls = $b2savObj->getJoinTableInfo($jtbl, $flds, " AND b2sav.iAssociationId={$iAssociationId} ", ' b2sav.iVerifiedID DESC ', '', ' LIMIT 0,1');
// pr($vb2spdtls); exit;
$vrq = $b2savObj->isVerifyReq($vb2spdtls);
$vsts = '';
if ($vrq == 'vreq') {
    $vsts = $b2savObj->chkRecVrf($vb2spdtls);
    if ($vsts == 'nr' || $vsts == 'om') {
        header('Location: ' . SITE_URL_DUM . 'b2supplierasoclist');
        exit;
    }
} else {
    if ($vrq == 'nr') {
        $flds = " b2bpa.*, org.vCompanyName as vBuyer2, org.vCompCode, bo.vCompanyName as vSupplier, bo.vCompCode ";
        $jtbl = " LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master bo on bo.iOrganizationID=b2bpa.iSupplierId\r\n               LEFT JOIN " . PRJ_DB_PREFIX . "_organization_master org on org.iOrganizationID=b2bpa.iBuyer2Id ";
        $vb2spdtls = $b2saObj->getJoinTableInfo($jtbl, $flds, " AND iAssociationId={$iAssociationId} ");
        $vrq = $b2savObj->isVerifyReq($vb2spdtls);
示例#4
0
<?php

$iAssociationId = GetVar('id');
/*if($sess_usertype == 'orgadmin' && $asoc != $iAssociationId) {
   header("Location: ".SITE_URL_DUM."oadashboard");
   exit;
}*/
if (!isset($b2saObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association.php";
    $b2saObj = new Buyer2_Supplier_Association();
}
if (!isset($b2savObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association_ToVerify.php";
    $b2savObj = new Buyer2_Supplier_Association_ToVerify();
}
$b2bprdtls = $b2saObj->select($iAssociationId);
$b2bprdthistory = $b2savObj->getHistory($iAssociationId);
// prints($b2bprdthistory); exit;
$smarty->assign('b2bprdtls', $b2bprdtls);
$smarty->assign('b2bprdthistory', $b2bprdthistory);
示例#5
0
<?php

if (!isset($b2saObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association.php";
    $b2saObj = new Buyer2_Supplier_Association();
}
if (!isset($b2savObj)) {
    include_once SITE_CLASS_APPLICATION . "organization/class.Buyer2_Supplier_Association_ToVerify.php";
    $b2savObj = new Buyer2_Supplier_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;
// pr($_POST); exit;
if ($mod == 'verify') {
    $dtv = $vasocdt = $b2savObj->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')) {