Changeset 762
- Timestamp:
- 01/15/10 13:13:56 (2 years ago)
- Location:
- trunk/phpbms/modules
- Files:
-
- 3 modified
-
api/apiwrapper.php (modified) (1 diff)
-
api/include/apiclass.php (modified) (2 diffs)
-
bms/include/invoices.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/api/apiwrapper.php
r761 r762 258 258 259 259 }//end function 260 261 262 /** 263 * function getDefaults 264 * 265 */ 266 267 function getDefaults($tabledefuuid){ 268 269 $params["request"][0]["command"] = "getDefaults"; 270 $params["request"][0]["data"] = ""; 271 $params["request"][0]["tabledefid"] = $tabledefuuid; 272 273 $response = $this->_callServer($params); 274 275 if($response !== false) 276 return $response[0]; 277 else 278 return false; 279 280 }//end function getDefaults 260 281 261 282 -
trunk/phpbms/modules/api/include/apiclass.php
r760 r762 464 464 break; 465 465 466 case "getDefaults": 467 468 include_once("include/tables.php"); 469 470 if($hasTableClassOveride){ 471 472 @ include_once("modules/".$modulename."/include/".$maintable.".php"); 473 474 if(class_exists($maintable)){ 475 476 $processor = new $maintable($this->db, $tabledefid); 477 $processor->dateFormat = $this->options->dateFormat; 478 $processor->timeFormat = $this->options->timeFormat; 479 480 }else{ 481 482 $processor = new phpbmsTable($this->db, $tabledefid); 483 $processor->dateFormat = $this->options->dateFormat; 484 $processor->timeFormat = $this->options->timeFormat; 485 486 }//end if 487 488 } else { 489 490 $processor = new phpbmsTable($this->db, $tabledefid); 491 $processor->dateFormat = $this->options->dateFormat; 492 $processor->timeFormat = $this->options->timeFormat; 493 494 }//end if 495 496 $therecord = $processor->getDefaults(); 497 498 $this->_addToResponse("retrieved", "defaults retrieved in tabledef ".$tabledefid, $therecord); 499 500 break; 501 466 502 case "insert": 467 503 //====================================================== … … 616 652 617 653 if($errorMessage) 618 $this->sendError(" Updatefailed from request number ".$i, $errorMessage);654 $this->sendError("Get failed from request number ".$i, $errorMessage); 619 655 elseif(!$this->options->useUuid){ 620 656 $therecord = $processor->getRecord((int) $request["data"]["id"], $this->options->useUuid); -
trunk/phpbms/modules/bms/include/invoices.php
r750 r762 625 625 $therecord["taxpercentage"]=$taxinfo["percentage"]; 626 626 $therecord["amountdue"]=0; 627 $therecord["amountpaid"]=0; 627 628 628 629 $therecord["hascredit"]=0; … … 632 633 $therecord["thelineitems"] = array(); 633 634 $therecord["cmid"] = ""; 635 636 $therecord["lineitemschanged"] = ""; 634 637 635 638 return $therecord; … … 833 836 $this->verifyErrors[] = "The `statusid` field does not give an existing/acceptable status id number."; 834 837 835 }//end if 838 } else { 839 840 $this->verifyErrors[] = "The `statusid` field must be set."; 841 842 }//end if 836 843 837 844 //check booleans … … 1187 1194 require_once("addresstorecord.php"); 1188 1195 1196 if(!isset($variables["uuid"])) 1197 $variables["uuid"] = getUuid($this->db, $this->uuid, $newid); 1198 1189 1199 $newuuid = mysql_real_escape_string($variables["uuid"]); 1190 1200 … … 1194 1204 }//end if 1195 1205 1206 1207 if(!isset($variables["lineitemschanged"])) 1208 $variables["lineitemschanged"] =''; 1196 1209 1197 1210 if($variables["lineitemschanged"]==1){ … … 1206 1219 }//end if 1207 1220 1221 if(!isset($variables["statusdate"])) 1222 $variables["statusdate"] =''; 1223 1224 if(!isset($variables["assignedtoid"])) 1225 $variables["assignedtoid"] =''; 1226 1208 1227 //if($variables["statuschanged"]==1) 1209 $this->updateStatus($id,$variables["statusid"],$variables["statusdate"],$variables["assignedtoid"], $replace);1228 $this->updateStatus($id, $variables["statusid"], $variables["statusdate"], $variables["assignedtoid"], $replace); 1210 1229 1211 1230 if($variables["clienttype"] == "prospect" && $variables["type"] == "Order") … … 2061 2080 2062 2081 }//end foreach 2063 2082 2064 2083 if($count == count($this->idsArray)) 2065 2084 $message = $count." related credit memo(s) have been created."; 2066 2085 else 2067 2086 $message = $count." related credit memo(s) (of ".count($this->idsArray)." selected) have been created."; 2068 2087 2069 2088 return $message; 2070 2089