phpBMS

Changeset 767 for trunk

Show
Ignore:
Timestamp:
01/18/10 13:08:08 (2 years ago)
Author:
brieb
Message:
  • Turned off all warnings and errors when not in debug mode. This is for security purposes so that the absolute path is not exposed.
  • fixed AR run aging to properly print checked print outs
  • Added code to grab the deafult time zone and set it. This will help stem problems from E_STRICT reporting and also should speed up some date/time functions.
  • Fixed line item to sales order relationships for new installs
Location:
trunk/phpbms
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/include/session.php

    r745 r767  
    3838*/ 
    3939 
    40 // Turn on/or off debugging 
     40/** 
     41 * Turn on/or off debugging 
     42 */ 
    4143@ define("APP_DEBUG", true); 
    4244if(APP_DEBUG) 
    43         error_reporting(E_ALL); 
    44  
     45    error_reporting(E_ALL); 
     46else 
     47    error_reporting(0); 
     48 
     49/** 
     50 * Until we instatiate time zone in the program 
     51 * This lines suppress warnings when error reporting is strict 
     52 */ 
     53@ date_default_timezone_set(date_default_timezone_get()); 
    4554 
    4655// Error Class - This class reports errors.  It can also log these errors 
  • trunk/phpbms/modules/bms/aritems_aging.php

    r704 r767  
    332332//Processor 
    333333//=========================================================================== 
    334 if(!isset($bypass)){ 
    335  
    336         include_once("../../include/session.php"); 
    337  
    338         $aging = new arAging($db); 
    339  
    340         if(isset($_POST["command"])){ 
    341  
    342                 switch($_POST["command"]){ 
    343  
    344                         case "run": 
    345                                 $aging->run($_POST["agingdate"]); 
    346  
    347                                 if(isset($_POST["printStatements"])) 
    348                                         $aging->printClientStatements = true; 
    349  
    350                                 if(isset($_POST["printSummary"])) 
    351                                         $aging->printSummary = true; 
    352  
    353                                 $aging->showResults(); 
    354  
    355                                 break; 
    356  
    357                         case "cancel": 
    358                                 goURL(APP_PATH."search.php?id=tbld%3Ac595dbe7-6c77-1e02-5e81-c2e215736e9c"); 
    359  
    360                 }//endswitch 
    361  
    362         } else 
    363                 $aging->showDialog(); 
     334if(!isset($noOutput)){ 
     335 
     336    include_once("../../include/session.php"); 
     337 
     338    $aging = new arAging($db); 
     339 
     340    if(isset($_POST["command"])){ 
     341 
     342            switch($_POST["command"]){ 
     343 
     344                case "run": 
     345 
     346                    if(!isset($_POST["agingdate"])) 
     347                        $error = new appError(200, "passed parameters not set"); 
     348 
     349                    $aging->run($_POST["agingdate"]); 
     350 
     351                    if(isset($_POST["printStatements"])) 
     352                        $aging->printClientStatements = true; 
     353 
     354                    if(isset($_POST["printSummary"])) 
     355                        $aging->printSummary = true; 
     356 
     357                    $aging->showResults(); 
     358                    break; 
     359 
     360                case "cancel": 
     361 
     362                    goURL(APP_PATH."search.php?id=tbld%3Ac595dbe7-6c77-1e02-5e81-c2e215736e9c"); 
     363 
     364            }//endswitch 
     365    } else 
     366        $aging->showDialog(); 
    364367 
    365368}//end if 
  • trunk/phpbms/modules/bms/install/relationships.sql

    r613 r767  
    33INSERT INTO `relationships` (`uuid`, `tofield`, `name`, `fromfield`, `fromtableid`, `totableid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `inherint`) VALUES ('rln:758183a0-d5f1-eb19-8acc-2de7789895c9', 'uuid', 'clients', 'clientid', 'tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 'tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083', 1, NOW(), 1, NOW(), '0'); 
    44INSERT INTO `relationships` (`uuid`, `tofield`, `name`, `fromfield`, `fromtableid`, `totableid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `inherint`) VALUES ('rln:f8ee5a95-a4b1-f55c-d01f-c705863c60b7', 'uuid', 'tax areas', 'taxareaid', 'tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 'tbld:c9ff2c8c-ce1f-659a-9c55-31bca7cce70e', 1, NOW(), 1, NOW(), '0'); 
    5 INSERT INTO `relationships` (`uuid`, `tofield`, `name`, `fromfield`, `fromtableid`, `totableid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `inherint`) VALUES ('rln:21988f3c-9c64-3b74-7ccc-1e71a2f82f2a', 'uuid', 'sales orders', 'invoiceid', 'tbld:31423480-a9b0-f0ff-749e-b3b5e18ca93c', 'tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 1, NOW(), 1, NOW(), '0'); 
     5INSERT INTO `relationships` (`uuid`, `tofield`, `name`, `fromfield`, `fromtableid`, `totableid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `inherint`) VALUES ('rln:21988f3c-9c64-3b74-7ccc-1e71a2f82f2a', 'id', 'sales orders', 'invoiceid', 'tbld:31423480-a9b0-f0ff-749e-b3b5e18ca93c', 'tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883', 1, NOW(), 1, NOW(), '0'); 
    66INSERT INTO `relationships` (`uuid`, `tofield`, `name`, `fromfield`, `fromtableid`, `totableid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `inherint`) VALUES ('rln:c6a0e198-c91d-0bdc-0d1d-23d4e2a59faf', 'uuid', 'products', 'productid', 'tbld:31423480-a9b0-f0ff-749e-b3b5e18ca93c', 'tbld:7a9e87ed-d165-c4a4-d9b9-0a4adc3c5a34', 1, NOW(), 1, NOW(), '0'); 
    77INSERT INTO `relationships` (`uuid`, `tofield`, `name`, `fromfield`, `fromtableid`, `totableid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `inherint`) VALUES ('rln:1ddf2bf3-781e-21b1-9e1f-e424f725a5eb', 'uuid', 'parent products', 'parentid', 'tbld:8179e105-5487-5173-d835-d9d510cc7f1b', 'tbld:7a9e87ed-d165-c4a4-d9b9-0a4adc3c5a34', 1, NOW(), 1, NOW(), '0'); 
  • trunk/phpbms/modules/bms/javascript/aritem_aging.js

    r485 r767  
    5050                ts = ts.getTime(); 
    5151 
     52                var tid = "tbld:c595dbe7-6c77-1e02-5e81-c2e215736e9c"; 
     53                var clientStatementUUID = "rpt:0df82ecf-5f05-56bd-18c3-e7cb27c0cf8a"; 
     54                var summaryUUID = "rpt:e25bdb7a-93be-b1d6-a292-cdec89c0c9fc"; 
     55 
    5256                if(printStatements.value == 1){ 
    5357 
    54                         theURL = APP_PATH+"modules/bms/report/aritems_clientstatement.php?cmd=print&sd="+encodeURIComponent(agingdate.value)+"&ts="+ts+"&ext=.pdf"; 
     58                        theURL = APP_PATH + "modules/bms/report/aritems_clientstatement.php?cmd=print"; 
     59                        theURL += "&sd=" + encodeURIComponent(agingdate.value); 
     60                        theURL += "&tid=" + encodeURIComponent(tid); 
     61                        theURL += "&rid=" + encodeURIComponent(clientStatementUUID); 
     62                        theURL += "&ts=" + encodeURIComponent(ts); 
     63                        theURL += "&ext=.pdf"; 
    5564                        window.open(theURL, 'phpBMSprint1'); 
    5665 
     
    5968                if(printSummary.value == 1){ 
    6069 
    61                         theURL = APP_PATH+"modules/bms/report/aritems_summary.php?cmd=print&sd="+encodeURIComponent(agingdate.value)+"&ts="+ts; 
     70                        theURL = APP_PATH+"modules/bms/report/aritems_summary.php?cmd=print" 
     71                        theURL += "&sd=" + encodeURIComponent(agingdate.value); 
     72                        theURL += "&tid=" + encodeURIComponent(tid); 
     73                        theURL += "&rid=" + encodeURIComponent(summaryUUID); 
     74                        theURL += "&ts=" + encodeURIComponent(ts); 
    6275                        window.open(theURL, 'phpBMSprint2'); 
    6376 
Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.