Exemplo n.º 1
0
if ($havewriteperm == 1) {
    $permctrl = $readwritepermctrl;
} else {
    $permctrl = $readonlypermctrl;
}
$action = $_REQUEST['action'];
$o = new Quotation();
$o->issotrx = 1;
$o->quotationfilename = "salesquotation.php";
$o->spquotation_prefix = $prefix_spi;
//$o->documenttype='I';//1=quotation, 2=cashbill saverecord
$o->updated = date("Y-m-d H:i:s", time());
$o->updatedby = $xoopsUser->getVar("uid");
switch ($action) {
    case "html":
        $o->showHtmlTable($_POST["quotation_id"]);
        break;
    case "checkaddresstext":
        include "../bpartner/class/Address.inc.php";
        $add = new Address();
        $addtxt = $add->getAddressTxt($_REQUEST['address_id']);
        echo $addtxt;
        break;
    case "create":
        if ($havewriteperm == 0) {
            redirect_header("{$o->quotationfilename}", $pausetime + 3, "Sorry, you don't have write permission.");
        }
        //   include "../simbiz/class/Track.inc.php";
        include "../bpartner/class/Address.inc.php";
        // $track = new Trackclass();
        $add = new Address();