Example #1
0
        $new_no = $o->getNextNo($documenttype, $defaultorganization_id);
        if ($documenttype == 1) {
            $prefix_doc = $prefix_spi;
        } else {
            if ($documenttype == 2) {
                $prefix_doc = $prefix_spi2;
            } else {
                $prefix_doc = "";
            }
        }
        echo <<<EOF
<script type='text/javascript'>
\tself.parent.document.frmInvoice.spinvoice_prefix.value="{$prefix_doc}";
\tself.parent.document.frmInvoice.document_no.value="{$new_no}";
\t</script>
EOF;
        break;
    default:
        $token = $s->createToken($tokenlife, "CREATE_NOTE");
        $o->orgctrl = $ctrl->selectionOrg($o->createdby, $defaultorganization_id, 'N', "", 'Y');
        $o->accountsctrl = $simbizctrl->getSelectAccounts(0, 'Y', "", "accounts_id", "and (account_type<>2 AND account_type<>3)");
        $o->bpartneraccountsctrl = $simbizctrl->getSelectAccounts(0, 'Y', "onchange='reloadBPartnerAccount(this.value)'", "bpartneraccounts_id", "and ( account_type=2 or account_type=3)");
        $o->bpartnerctrl = $bpctrl->getSelectBPartner(0, 'Y', "onchange='changeBPartner(this.value)'", "bpartner_id2", "and bpartner_id=0", "N", "bpartner_id2");
        $o->currencyctrl = $ctrl->getSelectCurrency($defaultcurrency_id, 'N', 'currency_id', "", "onchange='refreshUnitPrice(this.value)'");
        $o->exchangerate = 1;
        $o->getInputForm("new", 0, $token);
        //	$o->showInvoiceTable("WHERE piv.invoice_id>0 and piv.organization_id=$defaultorganization_id","ORDER BY piv.invoice_no, piv.totalpcs  LIMIT 0,30");
        break;
}
echo '</td>';
require XOOPS_ROOT_PATH . '/footer.php';
Example #2
0
    public function showEditFollowUpLayer($followup_id)
    {
        global $xoTheme, $nitobigridthemes, $url, $issuedatecal, $nextfollowupdatecal;
        include "../bpartner/class/BPSelectCtrl.inc.php";
        include "../hr/class/HRSelectCtrl.inc.php";
        include_once "../simantz/class/datepicker/class.datepicker.php";
        $dp = new datepicker("{$url}");
        $dp->dateFormat = 'Y-m-d';
        $issuedatecal = $dp->show('issuedate');
        $nextfollowupdatecal = $dp->show('nextfollowupdate');
        $bpctrl = new BPSelectCtrl();
        if ($followup_id == 0) {
            $bpcontrol = $bpctrl->getSelectBPartner(0, "Y");
            $followtypectrl = $bpctrl->getSelectFollowUpType(0, 'N');
            $ischecked = "checked";
            $issuedate = date("Y-m-d", time());
            $nextfollowupdate = date("Y-m-d", time());
        } else {
            $sql = "SELECT f.*,bp.bpartner_name,bp.bpartner_no,ft.followuptype_name,f.employee_name\r\n    FROM sim_followup f\r\n    inner join sim_bpartner bp on f.bpartner_id=bp.bpartner_id\r\n    inner join sim_followuptype ft on f.followuptype_id =ft.followuptype_id\r\n    where followup_id={$followup_id}";
            $query = $this->xoopsDB->query($sql);
            while ($row = $this->xoopsDB->fetchArray($query)) {
                $bpartner_name = htmlspecialchars($row['bpartner_name']);
                $bpartner_no = htmlspecialchars($row['bpartner_no']);
                $bpartner_id = $row['bpartner_id'];
                $followup_name = htmlspecialchars($row['followup_name']);
                $followuptype_id = $row['followuptype_id'];
                $employee_name = htmlspecialchars($row['employee_name']);
                $description = htmlspecialchars($row['description']);
                $issuedate = $row['issuedate'];
                $contactperson = htmlspecialchars($row['contactperson']);
                $contactnumber = htmlspecialchars($row['contactnumber']);
                $nextfollowupdate = htmlspecialchars($row['nextfollowupdate']);
                $isactive = $row['isactive'];
                $followtypectrl = $bpctrl->getSelectFollowUpType($followuptype_id, 'N');
                $bpcontrol = "<a href='bpartner.php?action=viewsummary&bpartner_id={$bpartner_id}'>{$bpartner_no}-{$bpartner_name}</a>";
                //    $empcontrol="<a href='../hr/employee.php?action=viewsummary&employee_id=$employee_id'>$employee_name</a>";
                //Netgate
                if ($isactive == 1) {
                    $ischecked = "checked";
                } else {
                    $ischecked = "";
                }
            }
        }
        echo <<<EOF

<div class="dimBackground"></div>
<form name="getFWform" id="getFWformid" method="post" action="bpartner.php" onsubmit="return false" >
<div align="center">
<table style="width:950px;" align="center" class="searchformblock" >

      <tr>
        <td colspan="8" >
        <table class="tdListRightTitle"><tr >
        <td align="center">Follow Up</td>
        <td align="right"><img src="images/close.png" onclick="closeWindow();" style="cursor:pointer" title="Close"></td>
        </tr></table>
        </td>
     </tr>



    <tr><td class="searchformblock">

     <table>
   <tr>
          <td class="head" >Business Partner</td>
          <td>{$bpcontrol}</td>
          <td class="head" >Type</td>
          <td><select id="followuptype_id" name="followuptype_id">{$followtypectrl}</select></td>
        </tr>

        <tr>
          <td class="head" >Title</td>
          <td><input {$colstyle}   id="followup_name" name="followup_name" size="60" type="text" value="{$followup_name}" onfocus="this.style.backgroundColor='#efefef'" onblur="this.style.backgroundColor=''" /></td>
          <td class="head" >Date</td>
          <td><input {$colstyle}  id="issuedate" name="issuedate" type="text" value="{$issuedate}" onfocus="this.style.backgroundColor='#efefef'" onblur="this.style.backgroundColor=''" /><input type="button" onclick="{$issuedatecal}" value='Date'></td>
        </tr>
        <tr>
          <td class="head" >Contact Person</td>
          <td><input {$colstyle}   id="contactperson" name="contactperson" type="text" value="{$contactperson}" onfocus="this.style.backgroundColor='#efefef'" onblur="this.style.backgroundColor=''" /></td>
          <td class="head" >Contact Number</td>
          <td><input {$colstyle}  id="contactnumber" name="contactnumber" type="text" value="{$contactnumber}" onfocus="this.style.backgroundColor='#efefef'" onblur="this.style.backgroundColor=''" /></td>
        </tr>
        <tr>
          <td class="head">Employee</td>
          <td><input {$colstyle}   id="employee_name" name="employee_name" size="60" type="text" value="{$employee_name}" onfocus="this.style.backgroundColor='#efefef'" onblur="this.style.backgroundColor=''" /></td>
          <td class="head" >Next Follow Up Date</td>
          <td><input {$colstyle}   id="nextfollowupdate" name="nextfollowupdate" type="text" value="{$nextfollowupdate}" onfocus="this.style.backgroundColor='#efefef'" onblur="this.style.backgroundColor=''" /><input type="button" onclick="{$nextfollowupdatecal}" value='Date'></td>
        </tr>
        <tr>
          <td class="head" >Description</td>
          <td colspan="3"><textarea {$colstyle}  cols="70" rows="10" id="description" name="description" onfocus="this.style.backgroundColor='#efefef'" onblur="this.style.backgroundColor=''">{$description}</textarea>
                    <Label>Active <input name="isactive" id="isactive" type="checkbox" {$ischecked}></Label></td>

        </tr>
        <tr>
          <td class="head"></td>
          <td colspan="3"><input name="submit" value="save" type="submit" onclick="save()"/>
                        <input name="action" value="savefollowuplayer" type="hidden"/>
                        <input name="followup_id" value="{$followup_id}" type="hidden"/></td>

        </tr>
     </table>

    </td></tr>

</table>
</div>
</form>

EOF;
    }