Changeset 501
- Timestamp:
- 04/21/09 11:08:21 (3 years ago)
- Location:
- trunk/phpbms
- Files:
-
- 4 added
- 3 modified
-
common/stylesheet/mozilla/pages/bms/post.css (added)
-
include/post_class.php (modified) (4 diffs)
-
modules/bms/include/invoices.php (modified) (1 diff)
-
modules/bms/include/post.php (added)
-
modules/bms/include/receipts.php (modified) (3 diffs)
-
modules/bms/javascript/post.js (added)
-
modules/bms/post.php (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/include/post_class.php
r499 r501 9 9 var $maintable = ""; 10 10 var $datefieldname = ""; 11 var $notpostedCriteria = ""; 11 12 12 13 function tablePost($db, $modifiedby = NULL){ … … 22 23 23 24 24 function getRecordsToPost($startdate , $enddate){25 function getRecordsToPost($startdate = null, $enddate = null){ 25 26 // This function creates an array of 26 27 // record ids within the date range given … … 34 35 `".$this->maintable."` 35 36 WHERE 36 `".$this->maintable."`.readytopost = 1 37 `".$this->maintable."`.readytopost = 1"; 38 39 if($startdate){ 40 41 $querystatement .= " 37 42 AND `".$this->maintable."`.`".$this->datefieldname."` >= '".dateToString($startdate, "SQL")."' 38 43 AND `".$this->maintable."`.`".$this->datefieldname."` <= '".dateToString($enddate, "SQL")."'"; 39 44 45 }//endif 46 47 if($this->notpostedCriteria){ 48 49 $querystatement .= " 50 AND ".$this->notpostedCriteria; 51 52 }//endif 53 40 54 $queryresult = $this->db->query($querystatement); 41 55 42 while($the cord = $this->db->fetchArray($queryresult))56 while($therecord = $this->db->fetchArray($queryresult)) 43 57 $idarray[] = $therecord["id"]; 44 58 … … 53 67 // segment using 'IN' 54 68 55 $where = "`".$this->maintable."`.id IN";69 $where = "`".$this->maintable."`.id "; 56 70 if(count($idarray)) 57 71 $where .= " IN(".implode(",", $idarray).")"; -
trunk/phpbms/modules/bms/include/invoices.php
r499 r501 1322 1322 class invoicesPost extends tablePost{ 1323 1323 1324 var $maintable = "invoices"; 1325 var $datefieldname = "invoicedate"; 1326 var $notpostedCriteria = "(invoices.type != 'Invoice' && invoices.type != 'VOID')"; 1324 1327 1325 1328 function prepareWhere($whereclause=NULL){ -
trunk/phpbms/modules/bms/include/receipts.php
r499 r501 606 606 class receiptsPost extends tablePost{ 607 607 608 var $maintable = "receipts"; 609 var $datefieldname = "receiptdate"; 610 var $notpostedCriteria = "receipts.posted = 0"; 608 611 609 612 function prepareWhere($whereclause=NULL){ … … 741 744 742 745 $this->updatePostingSession($postsessionid, $count); 743 746 744 747 return $count; 745 748 … … 751 754 752 755 if(class_exists("tablePost")){ 753 defineReceipt Post($db);756 defineReceiptsPost($db); 754 757 } 755 758 ?>