phpBMS

Show
Ignore:
Timestamp:
01/01/10 14:34:39 (2 years ago)
Author:
nate
Message:
  • Removed references to 'deposits' and replaced them with references to 'credits' (in relation to ar items and receipts).
  • Made sure that the type field for aritems should be able to take 'credit' but not 'deposit', and the update will change the references from deposit to credit (this time on the database side).
  • Fixed bugs with generateuuids.php and with the load open items button on the receipts add-edit.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/bms/include/aritems.php

    r698 r701  
    3737 +-------------------------------------------------------------------------+ 
    3838*/ 
     39 
     40if(class_exists("phpbmsTable")){ 
     41        class aritems extends phpbmsTable{ 
     42                 
     43                function getRecord($id, $useUuid = false){ 
     44                         
     45                        $therecord = parent::getRecord($id, $useUuid); 
     46                         
     47                        /** 
     48                          *   If type is credit, get the receipt id 
     49                          *   else get the invoice id 
     50                          */ 
     51                        if($therecord["type"] == "credit") 
     52                                $therecord["editrelatedid"] = getId($this->db, "tbld:43678406-be25-909b-c715-7e2afc7db601", $therecord["relatedid"]); 
     53                        else 
     54                                $therecord["editrelatedid"] = getId($this->db, "tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883", $therecord["relatedid"]); 
     55                                 
     56                        return $therecord; 
     57                         
     58                }//end function --getRecord-- 
     59                 
     60        }//end class 
     61}//end if 
     62 
    3963class relatedClient{ 
    4064 
     
    119143                "; 
    120144 
    121                         if($this->aritem["type"] == "deposit") 
     145                        if($this->aritem["type"] == "credit") 
    122146                                $querystatement.=" 
    123147                                        AND receipts.uuid != '".mysql_real_escape_string($this->aritem["relatedid"])."'"; 
     
    147171                $this->totals = $this->db->fetchArray($totalresult); 
    148172 
    149                 if($this->aritem["type"] == "deposit") 
     173                if($this->aritem["type"] == "credit") 
    150174                        $this->totals["applied"] = $this->totals["applied"] + $this->aritem["amount"]; 
    151175 
     
    203227                                                                $therecord["name"] = "other"; 
    204228 
    205                                                         if($therecord["id"] == $this->aritem["relatedid"] && $this->aritem["type"] == "deposit") 
     229                                                        if($therecord["id"] == $this->aritem["relatedid"] && $this->aritem["type"] == "credit") 
    206230                                                                $therecord["applied"] = -1 * $therecord["applied"]; 
    207231 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.