Changeset 701 for trunk/phpbms/modules/bms/include/aritems.php
- Timestamp:
- 01/01/10 14:34:39 (2 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/modules/bms/include/aritems.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/bms/include/aritems.php
r698 r701 37 37 +-------------------------------------------------------------------------+ 38 38 */ 39 40 if(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 39 63 class relatedClient{ 40 64 … … 119 143 "; 120 144 121 if($this->aritem["type"] == " deposit")145 if($this->aritem["type"] == "credit") 122 146 $querystatement.=" 123 147 AND receipts.uuid != '".mysql_real_escape_string($this->aritem["relatedid"])."'"; … … 147 171 $this->totals = $this->db->fetchArray($totalresult); 148 172 149 if($this->aritem["type"] == " deposit")173 if($this->aritem["type"] == "credit") 150 174 $this->totals["applied"] = $this->totals["applied"] + $this->aritem["amount"]; 151 175 … … 203 227 $therecord["name"] = "other"; 204 228 205 if($therecord["id"] == $this->aritem["relatedid"] && $this->aritem["type"] == " deposit")229 if($therecord["id"] == $this->aritem["relatedid"] && $this->aritem["type"] == "credit") 206 230 $therecord["applied"] = -1 * $therecord["applied"]; 207 231