Пример #1
0
$elid = PostVar('elid');
$elnm = PostVar('elnm');
$ocf = PostVar('ocf');
$ext = stripcslashes(PostVar('ext'));
$dflt = stripcslashes(PostVar('dflt'));
if (!isset($invOrdObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.InvoiceOrderHeading.php";
    $invOrdObj = new InvoiceOrderHeading();
}
if (!isset($purOrdObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.PurchaseOrderHeading.php";
    $purOrdObj = new PurchaseOrderHeading();
}
$orgas = "";
if ($eType == "Invoice") {
    $invdtls = $invOrdObj->getDetails('iBuyerOrganizationID,iSupplierOrganizationID', " AND iInvoiceID={$iInvoiceID} ");
} else {
    if ($eType == "PO") {
        $invdtls = $purOrdObj->getDetails('iBuyerOrganizationID,iSupplierOrganizationID', " AND iPurchaseOrderID={$iPurchaseOrderID} ");
    }
}
if ($invdtls[0]['iBuyerOrganizationID'] == $curORGID) {
    $orgas = "Buyer";
} else {
    if ($invdtls[0]['iSupplierOrganizationID'] == $curORGID) {
        $orgas = "Supplier";
    }
}
$orgas = trim($orgas) != '' ? $orgas : $uorg_type;
$dtls = array();
if ($curORGID > 0 && $orgas != '') {
Пример #2
0
    $phoneData = @explode("-", $podtls[0][$field]);
    if (count($phoneData) == 1) {
        $podtls[0][$field] = $phoneData[0];
    } else {
        $podtls[0][$field . 'Code'] = $phoneData[0];
        $podtls[0][$field] = $phoneData[1];
    }
}
phoneCode('vBillToContactTelephone');
phoneCode('vShipToContactTelephone');
# Invoice Code DropDownBox Data [START]
$stsdtls = $statusmasterObj->getDetails('*', " AND vStatus_en='Accepted' AND eFor='Invoice' ");
$sid = $sts = $stsdtls[0]['iStatusID'];
$where = " AND iStatusID={$sts} ";
$where .= " AND iBuyerOrganizationID={$curORGID} ";
$invoiceCodeData = $invOrdObj->getDetails("vInvoiceCode as vTitle,iInvoiceID as Id", $where);
# Invoice Code DropDownBox Data [END]
# PO Code DropDownBox Data [START]
//$stsdtls = $statusmasterObj->getDetails('*'," AND vStatus_en='Accepted' AND eFor='PO' ");
//$sts = $stsdtls[0]['iStatusID'];
//$where = " AND iStatusID=$sts ";
$where = " AND iBuyerOrganizationID={$curORGID} ";
$POCodeData = $pohObj->getDetails("vPOCode as vTitle,iPurchaseOrderID as Id", $where);
# PO Code DropDownBox Data [END]
// prints($podtls);exit;
$smarty->assign('poad', $poad);
$smarty->assign('podtls', $podtls);
$smarty->assign('asocdtls', $asocdtls);
$smarty->assign('lineItemTax', $lineItemTax);
$smarty->assign('stateArr', $stateArr);
$smarty->assign('OrgCode', $OrgCode);
Пример #3
0
               $nxtstatus = $isusts[0]; 	// $acptsts[0]; 	// $isusts[0];
               } */
        }
    }
}
// prints($nxtstatus); exit;
// echo $permitted; exit;
//prints($poData);
if ($poData['iModifiedByID'] == $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID'] && $poData['eDelete'] == 'Yes') {
    $nxtstatus['vStatusMsg'] = $smarty->get_template_vars('MSG_OTHER_VERIFICATION_NEED');
}
//prints($poData);
$crt_inv = '';
if ($poData['iStatusID'] == $acptsts[0]['iStatusID'] && (trim($poData['iInvoiceID']) < 1 || trim($poData['iInvoiceID']) == '') && $var_msg != 'pop') {
    if ($curORGID == $poData['iSupplierOrganizationID']) {
        $inv = $iohObj->getDetails('iInvoiceID', " AND iPurchaseOrderID={$iPurchaseOrderID} ");
        if (count($inv) == 0) {
            $crt_inv = 'yes';
        }
    }
    // echo "hi"; exit;
}
$invstat = '';
if ($poData['iBuyerOrganizationID'] == $curORGID) {
    if ($isusts[0]['iStatusID'] == $poData['iStatusID'] && (trim($poData['iInvoiceID']) == '' || trim($poData['iInvoiceID']) < 1)) {
        // $invstat = 'ureview';
    } else {
        // if(trim($poData['iInvoiceID'])>0)
        $rlinv = $iohObj->getDetails('iStatusID', " AND iPurchaseOrderID={$iPurchaseOrderID} ", " iInvoiceID DESC ");
        if (isset($rlinv) && count($rlinv) > 0) {
            if ($rlinv[0]['iStatusID'] == 0 && isset($rlinv[0]['iStatusID'])) {
Пример #4
0
         $wh = "AND iOrganizationID = {$curORGID}";
     }
     $usercary = array("ID" => "promptuser_id", "Name" => "promptuser_id", "Type" => "Query", "tableName" => PRJ_DB_PREFIX . "_organization_user", "fieldId" => "iUserID", "fieldName" => "vUserName", "extVal" => '', "selectedVal" => '', "width" => '230px', "height" => '', "onchange" => '', "selectText" => "--- " . $smarty->get_template_vars('LBL_SELECT') . ' ' . $smarty->get_template_vars('LBL_USER') . " ---", "where" => " eStatus = 'Active' {$wh} ", "multiple_select" => "", "orderby" => '', "extra" => "title='" . $smarty->get_template_vars('LBL_SELECT') . ' ' . $smarty->get_template_vars('LBL_USER') . "'", "validationmsg" => "", "class" => "required");
     $user_combo = $gdbobj->DynamicDropDown($usercary);
     $user_combo = str_replace('"', '\\"', $user_combo);
     $user_combo = "<span class='puser' style='display:inline-block;'>" . $user_combo . "</span><span style='float:right; padding-right:70px;'>" . $smarty->get_template_vars('LBL_FILTER_LIST_BY') . " : <input type='text' name='usrfilter' id='usrfilter' style='width:100px;' /></span>";
     $shuc = '';
 } else {
     $user_combo = "<input type='text' name='promptuser_id' id='promptuser_id' class='required' value='" . $sess_id . "' />";
 }
 //
 if ($sess_usertype_short != 'SM') {
     $wh = "(iSupplierOrganizationID = {$curORGID} OR iBuyerOrganizationID = {$curORGID})";
     $invcary = array("ID" => "promptinvoice_id", "Name" => "promptinvoice_id", "Type" => "Query", "tableName" => PRJ_DB_PREFIX . "_inovice_order_heading", "fieldId" => "iInvoiceID", "fieldName" => "vInvSupplierCode", "extVal" => '', "selectedVal" => '', "width" => '230px', "height" => '', "onchange" => '', "selectText" => "--- " . $smarty->get_template_vars('LBL_SELECT') . ' ' . $smarty->get_template_vars('LBL_INVOICE') . " ---", "where" => " {$wh} ", "multiple_select" => "", "orderby" => '', "extra" => "title='" . $smarty->get_template_vars('LBL_SELECT') . ' ' . $smarty->get_template_vars('LBL_INVOICE') . "'", "validationmsg" => "", "class" => "required");
     if ($parameter == "inv") {
         $res = $invoiceObj->getDetails('iInvoiceID,vInvSupplierCode', "and iInvoiceID={$iID} AND (iSupplierOrganizationID = {$curORGID} OR iBuyerOrganizationID = {$curORGID})");
         $inv_combo = $res[0]['vInvSupplierCode'];
         $inv_combo = "<span class='pinv' style='display:inline-block;'>" . $inv_combo . "</span><input type='hidden' name='promptinvoice_id' id='promptinvoice_id' value='" . $res[0]['iInvoiceID'] . "'>";
     } else {
         $inv_combo = $gdbobj->DynamicDropDown($invcary);
         $inv_combo = str_replace('"', '\\"', $inv_combo);
         $inv_combo = "<span class='pinv' style='display:inline-block;'>" . $inv_combo . "</span><span style='float:right; padding-right:70px;'>" . $smarty->get_template_vars('LBL_FILTER_LIST_BY') . " : <input type='text' name='invfilter' id='invfilter' style='width:100px;' /></span>";
     }
 }
 //
 if ($sess_usertype_short != 'SM') {
     $wh = "(iSupplierOrganizationID = {$curORGID} OR iBuyerOrganizationID = {$curORGID})";
     $pocary = array("ID" => "promptpo_id", "Name" => "promptpo_id", "Type" => "Query", "tableName" => PRJ_DB_PREFIX . "_purchase_order_heading", "fieldId" => "iPurchaseOrderID", "fieldName" => "vPoBuyerCode", "extVal" => '', "selectedVal" => '', "width" => '230px', "height" => '', "onchange" => '', "selectText" => "--- " . $smarty->get_template_vars('LBL_SELECT') . ' ' . $smarty->get_template_vars('LBL_PURCHASE_ORDER') . " ---", "where" => " {$wh} ", "multiple_select" => "", "orderby" => '', "extra" => "title='" . $smarty->get_template_vars('LBL_SELECT') . ' ' . $smarty->get_template_vars('LBL_PURCHASE_ORDER') . "'", "validationmsg" => "", "class" => "required");
     if ($parameter == "po") {
         $res = $pursesordObj->getDetails('iPurchaseOrderID,vPoBuyerCode', "and iPurchaseOrderID={$iID} AND (iSupplierOrganizationID = {$curORGID} OR iBuyerOrganizationID = {$curORGID})");
         $po_combo = $res[0]['vPoBuyerCode'];
Пример #5
0
if($sess_usertype == 'securitymanager')
    $where=" AND bom.iASMID='".$sess_id."'";
else
    $where = " AND bom.iOrganizationID = '".$sess_id."'";
*/
$where = " AND iStatusID={$sts} ";
if ($key != '' && $htmlTag == '') {
    $where .= ' AND vInvoiceCode LIKE "%' . $key . '%" ';
}
// echo $curORGID; exit;
//if($iOrganizationID != '')
//{
$where .= " AND iBuyerOrganizationID={$curORGID} ";
//}
// echo $where; exit;
$res = $iohObj->getDetails("vInvoiceCode as vTitle,iInvoiceID as Id", $where);
// prints($res);exit;
unset($res['tot']);
$html = '';
if (count($res) > 0 && is_array($res)) {
    $i = 0;
    if ($htmlTag == "option") {
        $html = "<option value=''>---" . $smarty->get_template_vars('LBL_SELECT') . " " . $smarty->get_template_vars('LBL_PO') . "---</option>";
    }
    foreach ($res as $arr) {
        if ($htmlTag == 'option') {
            if ($val == $arr['Id']) {
                $selected = "selected";
            } else {
                $selected = "";
            }
Пример #6
0
                 if (is_array($emailArr) && count($emailArr) > 0) {
                     for ($i = 0; $i < count($emailArr); $i++) {
                         $smname = $emailArr[$i]['vFirstName'] . ' ' . $emailArr[$i]['vLastName'];
                         $email = $emailArr[$i]['vEmail'];
                         $post_arr = array($smname, $oth_org[0]['vCompanyName'] . '(' . $oth_org[0]['vOrganizationCode'] . ')', $prv_dtls[0]['vRFQ2Code'], $prv_dtls[0]['vBidNum'], $prv_dtls[0]['fBidAdvanceTotal'], $prv_dtls[0]['fBidPriceTotal'], $link, $MAIL_FOOTER, SITE_URL);
                         $sendMail->Send("RFQ2 Award Accepted", "Member", $email, $body_arr, $post_arr);
                     }
                 }
                 //
                 if ($prv_dtls[0]['eFrom'] == "Invoice") {
                     $ress = $invOrdObj->updateData(array('eRfq2Awarded' => 'Yes'), " iInvoiceID=" . $prv_dtls[0]['iInvoiceID'] . " ");
                 } else {
                     if ($prv_dtls[0]['eFrom'] == "PO") {
                         $ress = $purOrdObj->updateData(array('eRfq2Awarded' => 'Yes'), " iPurchaseOrderID=" . $prv_dtls[0]['iPurchaseOrderID'] . " ");
                         if ($prv_dtls[0]['iPurchaseOrderID'] != "0" && $prv_dtls[0]['iPurchaseOrderID'] != "") {
                             $inv_det = $invOrdObj->getDetails('*', " AND iPurchaseOrderID = '" . $prv_dtls[0]['iPurchaseOrderID'] . "' ");
                             $rfq2_dets = $rfq2Obj->getDetails('*', " AND iInvoiceID = '" . $inv_det[0]['iInvoiceID'] . "' ");
                             if (count($rfq2_dets) > 0) {
                                 $rfq2_dtls['fPOAwardAdvace'] = $prv_dtls[0]['fBidAdvanceTotal'];
                                 $rfq2_dtls['fPOAwardPrice'] = $prv_dtls[0]['fBidPriceTotal'];
                                 $rfq2_dtls['fPOAwardAmount'] = $prv_dtls[0]['fBidAmount'];
                                 $ress = $rfq2Obj->updateData($rfq2_dtls, " iRFQ2Id=" . $prv_dtls[0]['iRFQ2Id'] . " ");
                             }
                         }
                     }
                 }
             }
         }
     }
 } else {
     $msg = 'rver';