当前位置: 首页>>代码示例>>PHP>>正文


PHP TD::getPropertyID方法代码示例

本文整理汇总了PHP中TD::getPropertyID方法的典型用法代码示例。如果您正苦于以下问题:PHP TD::getPropertyID方法的具体用法?PHP TD::getPropertyID怎么用?PHP TD::getPropertyID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TD的用法示例。


在下文中一共展示了TD::getPropertyID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setDetails

 function setDetails()
 {
     global $sess;
     # set the RPTOP to get the owner's object and information
     # get it from POST if possible, otherwise from GET
     $rptopID = isset($_POST['rptopID']) ? $_POST['rptopID'] : $_GET['rptopID'];
     //$rptopID = 14;
     $rptop = new RPTOP();
     $rptop->selectRecord($rptopID);
     $amountPaid = str_replace(",", "", $_POST['amountPaid']);
     $dateDue = $rptop->getTaxableYear();
     # must be a usable format
     $formValues['datePaid'] = date("F j, Y");
     $pORDate = $_POST['prevORDate'];
     if ($pORDate) {
         list($pmonth, $pday, $pyear) = explode("-", $pORDate);
         $formValues['porMonth'] = date("F", mktime(0, 0, 0, $pmonth + 1, 0, 0));
         $formValues['porYear'] = $pyear;
         $formValues['porDay'] = $pday;
     } else {
         $formValues['porMonth'] = "";
         $formValues['porYear'] = "";
         $formValues['porDay'] = "";
     }
     $formValues['orYear'] = substr($rptop->getTaxableYear(), 2);
     $formValues['orMonth'] = date("F");
     $formValues['orDay'] = date("j");
     $formValues['taxableYear'] = $rptop->getTaxableYear();
     $formValues['rptopNum'] = $rptop->getRptopNumber();
     $formValues['prevORNum'] = $_POST['prevORNum'];
     $formValues['orNum'] = $_POST['receiptNo'];
     $formValues['kindOfPayment'] = $_POST['kindOfPayment'];
     $formValues['checkNumber'] = $_POST['checkNum'];
     $formValues['checkDate'] = $_POST['checkDate'];
     # set the specific TD (although this is in the RPTOP), hard to search for it.
     # get the tdID from POST or GET to initialize the TD
     $tdID = isset($_POST['tdID']) ? $_POST['tdID'] : $_GET['tdID'];
     //$tdID = array(2,1);
     //$ownerID=5;
     $td = new TD();
     $ctr = 0;
     # $this->tpl->set_block('step3','PrintTDID','PrintTDIDs');
     //$this->tpl->set_block('step3','TDID','TDIDs');
     $this->tpl->set_block('receipt', 'Property', 'Properties');
     $this->tpl->set_block('Property', 'Owner', 'Owners');
     $n = 165;
     if (is_array($tdID)) {
         foreach ($tdID as $key => $id) {
             # set/pass tdIDs to form
             $this->tpl->set_var(tdID, $id);
             $this->tpl->parse('TDIDs', 'TDID', 'true');
             $td->selectRecord($id);
             $tdNum = $td->getTaxDeclarationNumber();
             $afs = new AFS();
             $formValues['tdNum'] = $tdNum;
             $afs->selectRecord($td->getAfsID());
             $od = new OD();
             $od->selectRecord($afs->getOdID());
             $addr = $od->getLocationAddress();
             # get municipality/province and city(same for all tds)
             //$lotAddress = new LocationAddress;
             //$lotAddress->selectRecordFromTdID($id);
             //$formValues['province'] = $lotAddress->getProvince();
             //$formValues['city'] = $lotAddress->getMunicipalityCity();
             $formValues['city'] = $addr->getMunicipalityCity();
             $formValues['province'] = $addr->getProvince();
             $formValues['municipalityCityID'] = $addr->getMunicipalityCityID();
             # get location/ block and lot number OR Barangay
             #$formValues['lotAddress'] = $lotAddress->getFullAddress();
             $formValues['lotAddress'] = $addr->getNumber . " " . $addr->getStreet();
             if ($formValues['lotAddress'] == "") {
                 $formValues['lotAddress'] = $addr->getBarangay();
             }
             $propertyType = $td->getPropertyType();
             $propertyID = $td->getPropertyID();
             $assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
             $formAssessedValue = number_format($td->getAssessedValue(), 2);
             # separate assessed value of land and others(plantsTrees, improvementsBuildings, machineries)
             if ($propertyType == "Land") {
                 $formValues['assessedValueLand'] = $formAssessedValue;
                 $formValues['assessedValueOthers'] = "";
             } else {
                 $formValues['assessedValueLand'] = "";
                 $formValues['assessedValueOthers'] = $formAssessedValue;
             }
             $formValues['assessedValue'] = $formAssessedValue;
             $formValues['propertyType'] = $propertyType;
             # set the owner's List
             # we define the owner from the RPTOP
             $ownerSwitch = true;
             if ($ctr > 0) {
                 $ownerValues['ownerName'] = "";
                 $ownerValues['ownerAddress'] = "";
                 $this->tpl->set_var($ownerValues);
                 $this->tpl->parse(Owners, Owner, false);
             } else {
                 $owner = $rptop->getOwner();
                 $personArray = $owner->getPersonArray();
                 if (is_array($personArray)) {
                     foreach ($personArray as $person) {
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:PrintRPTR_old.php

示例2: setDetails

 function setDetails()
 {
     global $sess;
     $this->tpl->set_var($_GET);
     $this->tpl->set_var($_POST);
     # set the RPTOP to get the owner's object and information
     # get it from POST if possible, otherwise from GET
     $rptopID = isset($_POST['rptopID']) ? $_POST['rptopID'] : $_GET['rptopID'];
     $rptop = new RPTOP();
     $rptop->selectRecord($rptopID);
     $dateDue = $rptop->getTaxableYear() . "-01-01";
     # must be a usable format
     $formValues['taxableYear'] = $rptop->getTaxableYear();
     $formValues['rptopNum'] = $rptop->getRptopNumber();
     # set the specific TD (although this is in the RPTOP), hard to search for it.
     # get the tdID from POST or GET to initialize the TD
     $tdID = isset($_POST['tdID']) ? $_POST['tdID'] : $_GET['tdID'];
     $td = new TD();
     $td->selectRecord($tdID);
     $tdNum = $td->getTaxDeclarationNumber();
     $formValues['tdNum'] = $tdNum;
     # we define the property from the TD
     $propertyType = $td->getPropertyType();
     $propertyID = $td->getPropertyID();
     switch ($propertyType) {
         case "Land":
             $property = new Land();
             break;
         case "PlantsTrees":
             $property = new PlantsTrees();
             break;
         case "ImprovementsBuildings":
             $property = new ImprovementsBuildings();
             break;
         case "Machineries":
             $property = new Machineries();
             break;
         default:
             echo "cannot be! {$propertyType}";
             break;
     }
     if (is_object($property)) {
         $property->selectRecord($propertyID);
         $assessedValue = number_format($property->getAssessedValue(), 2, ".", "");
         $formValues['assessedValue'] = number_format($property->getAssessedValue(), 2);
     }
     $formValues['propertyType'] = $propertyType;
     # set the owner's List
     # we define the owner from the RPTOP
     $this->tpl->set_block('step3', 'Owner', 'Owners');
     $owner = $rptop->getOwner();
     $personArray = $owner->getPersonArray();
     if (is_array($personArray)) {
         foreach ($personArray as $person) {
             $ownerValues['ownerName'] = $person->getLastName() . ", " . $person->getFirstName() . " " . $person->getMiddleName();
             $addressArray = $person->getAddressArray();
             $address = $addressArray[0];
             $ownerValues['ownerAddress'] = $address->getNumber() . " " . $address->getStreet() . "<br>" . $address->getBarangay() . ", " . $address->getMunicipalityCity() . "<br>" . $address->getProvince();
             $this->tpl->set_var($ownerValues);
             $this->tpl->parse('Owners', 'Owner', 'true');
         }
     }
     $companyArray = $owner->getCompanyArray();
     if (is_array($companyArray)) {
         foreach ($companyArray as $company) {
             $ownerValues['ownerName'] = $company->getCompanyName();
             $addressArray = $company->getAddressArray();
             $address = $addressArray[0];
             $ownerValues['ownerAddress'] = $address->getNumber() . " " . $address->getStreet() . "<br>" . $address->getBarangay() . ", " . $address->getMunicipalityCity() . "<br> " . $address->getProvince();
             $this->tpl->set_var($ownerValues);
             $this->tpl->parse('Owners', 'Owner', 'true');
         }
     }
     # tax dues are defined from TDNumber and taxableYear
     # compute for taxes
     $taxDue = new Dues();
     if ($taxDue->create($tdNum, $dateDue) == false) {
         $taxDue->setBasic($assessedValue);
         $taxDue->setSEF($assessedValue);
         $taxDue->setDueDate($dateDue);
         $taxDue->setUpdateDate();
     }
     $paymentPeriod = "Annual";
     if (isset($_POST['paymentPeriod'])) {
         $paymentPeriod = $_POST['paymentPeriod'];
     }
     switch ($paymentPeriod) {
         case 'Annual':
             $this->tpl->set_var("checkedAnnual", "checked");
             break;
         case 'Q1':
             $this->tpl->set_var("checkedQ1", "checked");
             break;
         case 'Q2':
             $this->tpl->set_var("checkedQ2", "checked");
             break;
         case 'Q3':
             $this->tpl->set_var("checkedQ3", "checked");
             break;
         case 'Q4':
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:RPTRPrint.php

示例3: recordReceipt


//.........这里部分代码省略.........
         $payments[3]->createRecord("0");
         $payments[3]->setAmount($penalty);
         $payments[3]->setDiscount("0");
         $payments[3]->setPenalty("0");
         $payments[3]->setDueID("000");
         $payments[3]->setDueType("backtaxTD-penalty,backtaxTDID=" . $backtaxTD->getBacktaxTDID());
         $payments[3]->setReceiptNum($varValues['receiptNo']);
         $payments[3]->storeRecord();
         $collections->addPayment($payments[3]);
         $payments[4] = new Payment("pd1185");
         $payments[4]->setApplication($application);
         $payments[4]->createRecord("000");
         $payments[4]->setAmount("0");
         $payments[4]->setDiscount("0");
         $payments[4]->setPenalty("0");
         $payments[4]->setDueID("000");
         $payments[4]->setDueType("backtaxTD-pd1185,backtaxTDID=" . $backtaxTD->getBacktaxTDID());
         $payments[4]->setReceiptNum($varValues['receiptNo']);
         $payments[4]->storeRecord();
         $collections->addPayment($payments[4]);
         //$taxDue->reapplyPayments();
         //$taxDue->store();
         //print_r($payments);
         if (!$proceed) {
             break;
         }
     }
     if (is_array($tdID)) {
         foreach ($tdID as $key => $id) {
             $td = new TD();
             $td->selectRecord($id);
             # get assessed value and use it to compute taxes -- 07 Aug 2003
             $propertyType = $td->getPropertyType();
             $propertyID = $td->getPropertyID();
             $assessedValue = number_format($td->getAssessedValue(), 2, ".", "");
             $tdNum = $td->getTaxDeclarationNumber();
             $collections->setTDNum($tdNum);
             # get the specific due by using the tdNum and the date on the RPTOP
             $rptop = new RPTOP();
             # changed to taxableYear & selected record using rptopID instead of rptopNum
             if ($rptop->selectRecord($varValues['rptopID'])) {
                 $dueDate = $rptop->getTaxableYear();
             } else {
                 # did not find due date in POST
                 // if there is no valid RPTOP provided, then just use the dueDate
                 $dueDate = $varValues['dueDate'];
             }
             $dueDate = $td->getTaxBeginsWithTheYear();
             $taxDue = new Dues($id, $dueDate);
             /*$taxDue = new Dues();*/
             if (!$taxDue->create($id, $dueDate)) {
                 $taxDue->setBasic($assessedValue);
                 $taxDue->setSEF($assessedValue);
                 # check if land is idle, if yes, set assessed value
                 if ($taxDue->getIdleStatus() == 1) {
                     $taxDue->setIdle($assessedValue);
                     $idleStatus = 1;
                 } else {
                     $taxDue->setIdle(0);
                     $idleStatus = 0;
                 }
             }
             $paymentPeriod = $taxDue->getPaymentMode();
             if ($taxDue->getPctPenalty() > 0 && $paymentPeriod != "Annual") {
                 $paymentPeriod = "Annual";
             }
开发者ID:armic,项目名称:erpts,代码行数:67,代码来源:RPTREncode.php


注:本文中的TD::getPropertyID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。