Пример #1
0
    }
    if ($Data['eSaved'] != 'Yes') {
        if ($id) {
            $sub1 = "Purchase Order Created";
            $type = "Create";
            $sub2 = "New Purchase Order";
        }
    }
    $redirecturl = SITE_URL . "index.php?file=u-purchaseorderadditems&id={$id}&msg={$msg}";
    $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG'] = $msg;
} else {
    if ($view == 'verify') {
        $eDelete = $_POST['edelete'];
        $iPurchaseOrderID = $_POST['iPOID'];
        if ($eDelete == 'Yes') {
            $pohObj->delete($iPurchaseOrderID);
            $msg = "rds";
            $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_MSG'] = $msg;
            header("location:" . SITE_URL_DUM . 'polist/' . $msg);
            exit;
        }
        $nstatus = $_POST['nstatus'];
        $podtl = $pohObj->select($iPurchaseOrderID);
        if ($totusrs > 1) {
            $dt['iStatusID'] = $nstatus;
        } else {
            $stsdtls = $statusmasterObj->getDetails('*', " AND eFor='PO' AND vStatus_en='Issued' ");
            $isusts = $stsdtls[0]['iStatusID'];
            if ($podtl[0]['iSupplierOrganizationID'] == $curORGID && $podtl[0]['iStatusID'] == $isusts) {
                $acptsts = $statusmasterObj->getDetails('*', " AND eFor='PO' AND vStatus_en='Accepted' ");
                $dt['iStatusID'] = $acptsts[0]['iStatusID'];