Fixed many minor bugs, new ones as well as debtor_trans related.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 26 May 2008 11:02:59 +0000 (11:02 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 26 May 2008 11:02:59 +0000 (11:02 +0000)
Changed to use DOCTYPE html 4.01 transitional. Some files/css needed change.

19 files changed:
CHANGELOG.txt
admin/backups.php
admin/create_coy.php
admin/inst_lang.php
admin/inst_module.php
gl/manage/exchange_rates.php
includes/page/header.inc
includes/session.inc
includes/ui/ui_controls.inc
includes/ui/ui_input.inc
includes/ui/ui_lists.inc
includes/ui/ui_view.inc
purchasing/allocations/supplier_allocate.php
sales/allocations/customer_allocate.php
sales/includes/db/sales_credit_db.inc
sales/inquiry/customer_allocation_inquiry.php
themes/aqua/default.css
themes/cool/default.css
themes/default/default.css

index 4757ff1c0d9d9c9fafc72ac7c72400aec980771b..90982c47ab2a947fc18594e99a6333158fadb0c8 100644 (file)
@@ -19,6 +19,30 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+26-May-2008 Joe Hunt
+# Fixed many minor bugs, new ones as well as debtor_trans related.
+! Changed to use DOCTYPE html 4.01 transitionel. Some files/css needed change.
+$ /admin/backups.php
+  /admin/create_coy.php
+  /admin/inst_lang.php
+  /admin/inst_module.php
+  /gl/manage/exchange_rates.php
+  /includes/session.inc
+  /includes/page/header.inc
+  /includes/ui/ui_controls.inc
+  /includes/ui/ui_input.inc
+  /includes/ui/ui_lists.inc
+  /includes/ui/ui_view.inc
+  /purchasing/allocations/supplier_allocate.php
+  /sales/allocations/customer_allocate.php
+  /sales/includes/db/sales_credit_db.inc
+  /sales/inquiry/customer_allocation_inquiry.php
+  /themes/aqua/default.css
+  /themes/cool/default.css
+  /themes/default/default.css
+  
+  
+
 23-May-2008 Joe Hunt
 # Minor bug in dimensions.php (Outstanding Dimensions)
 $ /applications/dimensions.php
index 4fcc453fe44516c0313b5ccf7abb469537bed312..cf2ef1cf3e4a4a1b5a48a86372d165a2ff9711fa 100644 (file)
@@ -9,7 +9,7 @@ include_once($path_to_root . "/admin/db/maintenance_db.inc");
 
 $valid_paths = valid_paths();
 //$valid_paths = '';
-if ($valid_paths != "") 
+if ($valid_paths != "")
 {
        page(_("Backup and Restore Database - Error"));
        display_error (_("Backup paths have not been set correctly.") ."&nbsp;&nbsp;&nbsp;" . _("Please contact System Administrator.") . "<br>" .$valid_paths);
@@ -45,7 +45,7 @@ echo "
                if (ext != 'sql') {
                        alert('" . _('This extension can not be be viewed: ') . "' + ext)
                        return
-               }       
+               }
                window.open('" . BACKUP_PATH . "'+pFilename, '', 'toolbar=no,scrollbars=yes')
        }
        function deleteBackup() {
@@ -71,31 +71,31 @@ echo "
        <table cellpadding=2 cellspacing=2 border=0>
        <tr><td colspan=2 style='color:darkred'><b>$msg</b>&nbsp;</td></tr>
        <tr>
-               <td style='padding-right:30'>" . _("Backup scripts") . "</td>
+               <td style='padding-right:30px'>" . _("Backup scripts") . "</td>
        </tr>
        <tr>
-               <td style='padding-right:30'>$cmb</td>
+               <td style='padding-right:30px'>$cmb</td>
                <script language='javascript'>
                        if (document.forms[0].cmb_backups.options.length!=0) document.forms[0].cmb_backups.selectedIndex=0
                </script>
                <td>
                        <table height=160 cellpadding=0 cellspacing=0 border=0>
-                       <tr><td><input onclick='javascript:createBackup()' type='button' style='width:150' value='". _("Create Backup") . "'></td><td style='padding-left:20'>" . _("Compression") . "&nbsp;&nbsp;$compr</td></tr>
-                       <tr><td><input onclick='javascript:restoreBackup()' type='button' style='width:150' value='". _("Restore Backup") . "'></td><td>&nbsp;</td></tr>
-                       <tr><td><input onclick='javascript:viewBackup()' type='button' style='width:150' value='". _("View Backup") . "'></td><td>&nbsp;</td></tr>
-                       <tr><td><input onclick='javascript:deleteBackup()' type='button' style='width:150' value='". _("Delete Backup") . "'></td><td>&nbsp;</td></tr>
-                       <tr><td><input onclick='javascript:downloadBackup()' type='button' style='width:150' value='". _("Download Backup") . "'></td><td>&nbsp;</td></tr>
-                       <tr><td><input onclick='javascript:uploadBackup()' type='button' style='width:150' value='". _("Upload Backup"). "'></td>
-                               <td style='padding-left:20'><input name='uploadfile' type='file'></td>
+                       <tr><td><input onclick='javascript:createBackup()' type='button' style='width:150px' value='". _("Create Backup") . "'></td><td style='padding-left:20px'>" . _("Compression") . "&nbsp;&nbsp;$compr</td></tr>
+                       <tr><td><input onclick='javascript:restoreBackup()' type='button' style='width:150px' value='". _("Restore Backup") . "'></td><td>&nbsp;</td></tr>
+                       <tr><td><input onclick='javascript:viewBackup()' type='button' style='width:150px' value='". _("View Backup") . "'></td><td>&nbsp;</td></tr>
+                       <tr><td><input onclick='javascript:deleteBackup()' type='button' style='width:150px' value='". _("Delete Backup") . "'></td><td>&nbsp;</td></tr>
+                       <tr><td><input onclick='javascript:downloadBackup()' type='button' style='width:150px' value='". _("Download Backup") . "'></td><td>&nbsp;</td></tr>
+                       <tr><td><input onclick='javascript:uploadBackup()' type='button' style='width:150px' value='". _("Upload Backup"). "'></td>
+                               <td style='padding-left:20px'><input name='uploadfile' type='file'></td>
                        </tr>
                        </table>
                </td>
        </tr>
        <tr>
-               <td style='padding-right:30'>" . _("Comments") . " (" . _("Create Backup") . ")</td>
+               <td style='padding-right:30px'>" . _("Comments") . " (" . _("Create Backup") . ")</td>
        </tr>
        <tr>
-               <td style='padding-right:30'><textarea rows=4 cols=30 name='comments'></textarea></td>
+               <td style='padding-right:30px'><textarea rows=4 cols=30 name='comments'></textarea></td>
        </tr>
        </table></center>";
 
@@ -106,47 +106,47 @@ end_form();
 end_page();
 
 
-function handle_form($conn) 
+function handle_form($conn)
 {
        global $path_to_root;
        //Generate Only
        if (isset($_GET['c']))
        {
-               if ($_GET['c']=='g') 
+               if ($_GET['c']=='g')
                {
                        $filename = generate_backup($conn, $_GET['comp'], $_GET['comm']);
                        header("Location: backups.php?c=gs&fn=" . urlencode($filename));
                        return "";
                }
                //Generate and download
-               if ($_GET['c']=='gd') 
+               if ($_GET['c']=='gd')
                {
                        $filename = generate_backup($conn);
                        header("Location: backups.php?c=ds&fn=" . urlencode($filename));
                        return "";
                }
                //Download the file
-               if ($_GET['c']=='d') 
+               if ($_GET['c']=='d')
                {
                        download_file(BACKUP_PATH . $_GET['fn']);
                        exit;
                }
                //Delete the file
-               if ($_GET['c']=='df') 
+               if ($_GET['c']=='df')
                {
                        $filename = $_GET['fn'];
                        @unlink(BACKUP_PATH . $filename);
                        header("Location: backups.php?c=dff&fn=" . urlencode($filename));
                        return "";
                }
-               if ($_GET['c']=='dff') 
+               if ($_GET['c']=='dff')
                {
                        $msg = _("File successfully deleted.")."&nbsp;&nbsp;&nbsp;";
                        $msg .= _("Filename") . " = " . $_GET['fn'];
                        return $msg;
                }
                //Write JS script to open download window
-               if ($_GET['c']=='ds') 
+               if ($_GET['c']=='ds')
                {
                        $filename = urlencode($_GET['fn']);
                        $msg = _("Backup is being downloaded...");
@@ -156,14 +156,14 @@ function handle_form($conn)
                        return $msg;
                }
                //Print backup success message
-               if ($_GET['c']=='gs') 
+               if ($_GET['c']=='gs')
                {
                        $msg = _("Backup successfully generated.")."&nbsp;&nbsp;&nbsp;";
                        $msg .= _("Filename") . " = " . $_GET['fn'];
                        return $msg;
                }
                //Restore backup
-               if ($_GET['c']=='r') 
+               if ($_GET['c']=='r')
                {
                        $filename=$_GET['fn'];
                        restore_backup(BACKUP_PATH . $filename, $conn);
@@ -171,48 +171,48 @@ function handle_form($conn)
                        return "";
                }
                //Print restore success message
-               if ($_GET['c']=='rs') 
+               if ($_GET['c']=='rs')
                {
                        $msg = _("Restore backup completed.")."&nbsp;&nbsp;&nbsp;";
                        return $msg;
                }
 
-               if ($_GET['c']=='u') 
+               if ($_GET['c']=='u')
                {
                        $filename = $_FILES['uploadfile']['tmp_name'];
-                       if (is_uploaded_file ($filename)) 
+                       if (is_uploaded_file ($filename))
                        {
                                restore_backup($filename, $conn);
                                $msg = _("Uploaded file has been restored.");
-                       } 
-                       else 
+                       }
+                       else
                        {
                                $msg = _("Backup was not uploaded into the system.");
                        }
                        return $msg;
                }
-       }       
+       }
        return "";
 }
 
-function generate_backup($conn, $ext='no', $comm='') 
+function generate_backup($conn, $ext='no', $comm='')
 {
        if ($conn['tbpref'] != "")
                $filename = $conn['dbname'] . "_" . $conn['tbpref'] . date("Ymd_Hi") . ".sql";
-       else    
+       else
                $filename = $conn['dbname'] . "_" . date("Ymd_Hi") . ".sql";
-       
-       $filename = db_export($conn, $filename, $ext, $comm); 
-       
+
+       $filename = db_export($conn, $filename, $ext, $comm);
+
        return $filename;
 }
 
-function restore_backup($filename, $conn) 
+function restore_backup($filename, $conn)
 {
        return db_import($filename, $conn);
-}      
+}
 
-function get_backup_file_combo() 
+function get_backup_file_combo()
 {
        global $path_to_root;
        $ar_files = array();
@@ -225,31 +225,31 @@ function get_backup_file_combo()
     rsort($ar_files);
        $opt_files = "";
     foreach ($ar_files as $file)
-       if (strpos($file, ".sql") || strpos($file, ".sql")) 
+       if (strpos($file, ".sql") || strpos($file, ".sql"))
                $opt_files .= "<option value='$file'>$file</option>";
 
-       return "<select name='cmb_backups' size=2 style='height:160;width:230'>$opt_files</select>";
+       return "<select name='cmb_backups' size=2 style='height:160px;width:230px'>$opt_files</select>";
 }
 
-function get_compr_combo() 
+function get_compr_combo()
 {
        $ar_comps = array();
-       
+
        $ar_comps[] = _("No");
-    if (function_exists("gzcompress")) 
+    if (function_exists("gzcompress"))
        $ar_comps[] = "zip";
-    if (function_exists("gzopen")) 
+    if (function_exists("gzopen"))
        $ar_comps[] = "gzip";
        $opt_comps = "";
     foreach ($ar_comps as $file)
        $opt_comps .= "<option value='$file'>$file</option>";
 
        return "<select name='cmb_comp'>$opt_comps</select>";
-}      
-       
-function download_file($filename) 
+}
+
+function download_file($filename)
 {
-    if (empty($filename) || !file_exists($filename)) 
+    if (empty($filename) || !file_exists($filename))
     {
         return FALSE;
     }
@@ -261,12 +261,12 @@ function download_file($filename)
     return true;
 }
 
-function valid_paths() 
+function valid_paths()
 {
        global $path_to_root;
-       
+
        $st = "";
-       if (!file_exists(BACKUP_PATH))  
+       if (!file_exists(BACKUP_PATH))
                $st .= "&nbsp;&nbsp;&nbsp;-&nbsp;" . _("cannot find backup directory") . " - " . BACKUP_PATH . "<br>";
        return $st;
 }
index af3cffd299cf1c696e594baef0f5b0875a32d666..d2498b017b8849649524c688aed259700341837e 100644 (file)
@@ -32,19 +32,25 @@ function check_data()
 {
        global $db_connections, $tb_pref_counter;
 
-       foreach($db_connections as $id=>$con) {
-         if ($_POST['host'] == $con['host'] && $_POST['dbname'] == $con['dbname']) {
-               if ($_POST['tbpref'] == $con['tbpref']) {
-                       display_error(_("This database settings are already used by another company."));
-                       return false;
-               }
-               if ($_POST['tbpref'] == 0 || $con['tbpref'] == '') {
-                       display_error(_("You cannot have table set without prefix together with prefixed sets in the same database."));
-                       return false;
-               }
-         }
+       if ($_POST['name'] == "" || $_POST['host'] == "" || $_POST['dbuser'] == "" || $_POST['dbname'] == "")
+               return false;
+       foreach($db_connections as $id=>$con)
+       {
+               if ($_POST['host'] == $con['host'] && $_POST['dbname'] == $con['dbname'])
+               {
+                       if ($_POST['tbpref'] == $con['tbpref'])
+                       {
+                               display_error(_("This database settings are already used by another company."));
+                               return false;
+                       }
+                       if ($_POST['tbpref'] == 0 || $con['tbpref'] == '')
+                       {
+                               display_error(_("You cannot have table set without prefix together with prefixed sets in the same database."));
+                               return false;
+                       }
+               }
        }
-         return true;
+       return true;
 }
 
 //---------------------------------------------------------------------------------------------
@@ -305,7 +311,7 @@ function display_company_edit($selected_id)
 
        end_table();
        display_note(_("Choose from Database scripts in SQL folder. No Datase is created without a script."), 0, 1);
-       echo "<center><input onclick='javascript:updateCompany()' type='button' style='width:150' value='". _("Save"). "'>";
+       echo "<center><input onclick='javascript:updateCompany()' type='button' style='width:150px' value='". _("Save"). "'>";
 
 
        end_form();
index b076cc02d1bf1892d1553cc7ce6fc7b45056c276..cc0cc0e3c07b1fc4ca92ed25b7b869319384c5b7 100644 (file)
@@ -16,7 +16,7 @@ include_once($path_to_root . "/includes/ui.inc");
 if (isset($_GET['selected_id']))
 {
        $selected_id = $_GET['selected_id'];
-} 
+}
 elseif (isset($_POST['selected_id']))
 {
        $selected_id = $_POST['selected_id'];
@@ -28,6 +28,8 @@ else
 
 function check_data()
 {
+       if ($_POST['code'] == "" || $_POST['name'] == "" || $_POST['encoding'] == "")
+               return false;
        return true;
 }
 
@@ -45,15 +47,15 @@ function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false)
    if (!is_array($aryData) || !$strIndex || !$strSortBy)
        //    return the array
        return $aryData;
-       
+
    //    create our temporary arrays
    $arySort = $aryResult = array();
-   
+
    //    loop through the array
    foreach ($aryData as $aryRow)
        //    set up the value in the array
        $arySort[$aryRow[$strIndex]] = $aryRow[$strSortBy];
-       
+
    //    apply the natural sort
    natsort($arySort);
 
@@ -61,7 +63,7 @@ function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false)
    if ($strSortType=="desc")
        //    reverse the array
        arsort($arySort);
-       
+
    //    loop through the sorted and original data
    foreach ($arySort as $arySortKey => $arySorted)
        foreach ($aryData as $aryOriginal)
@@ -72,7 +74,7 @@ function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false)
 
    //    return the return
    return $aryResult;
-} 
+}
 
 function write_lang()
 {
@@ -82,9 +84,9 @@ function write_lang()
        $conn = array_natsort($installed_languages, 'code', 'code');
        $installed_languages = $conn;
        //reset($installed_languages);
-       $n = count($installed_languages);       
+       $n = count($installed_languages);
        $msg = "<?php\n\n";
-       
+
        $msg .= "/* How to make new entries here\n\n";
        $msg .= "-- if adding languages at the beginning of the list, make sure it's index is set to 0 (it has ' 0 => ')\n";
        $msg .= "-- 'code' should match the name of the directory for the language under \\lang\n";
@@ -112,16 +114,16 @@ function write_lang()
 
        $filename = $path_to_root . "/lang/installed_languages.inc";
        // Check if the file exists and is writable first.
-       if (file_exists($filename) && is_writable($filename)) 
+       if (file_exists($filename) && is_writable($filename))
        {
-               if (!$zp = fopen($filename, 'w')) 
+               if (!$zp = fopen($filename, 'w'))
                {
                        display_error(_("Cannot open the languages file - ") . $filename);
                        return false;
-               } 
-               else 
+               }
+               else
                {
-                       if (!fwrite($zp, $msg)) 
+                       if (!fwrite($zp, $msg))
                        {
                                display_error(_("Cannot write to the language file - ") . $filename);
                                fclose($zp);
@@ -130,8 +132,8 @@ function write_lang()
                        // Close file
                        fclose($zp);
                }
-       } 
-       else 
+       }
+       else
        {
                display_error(_("The language file ") . $filename . _(" is not writable. Change its permissions so it is, then re-run the operation."));
                return false;
@@ -156,12 +158,12 @@ function handle_submit()
        $installed_languages[$id]['rtl'] = (bool)$_POST['rtl'];
        if (!write_lang())
                return false;
-       $directory = $path_to_root . "/lang/" . $_POST['code']; 
+       $directory = $path_to_root . "/lang/" . $_POST['code'];
        if (!file_exists($directory))
        {
                mkdir($directory);
                mkdir($directory . "/LC_MESSAGES");
-       }       
+       }
        if (is_uploaded_file($_FILES['uploadfile']['tmp_name']))
        {
                $file1 = $_FILES['uploadfile']['tmp_name'];
@@ -187,13 +189,13 @@ function handle_delete()
 {
        global  $path_to_root, $installed_languages;
 
-       $id = $_GET['id'];      
+       $id = $_GET['id'];
 
        $lang = $installed_languages[$id]['code'];
-       $filename = "$path_to_root/lang/$lang/LC_MESSAGES";     
-       if ($h = opendir($filename)) 
+       $filename = "$path_to_root/lang/$lang/LC_MESSAGES";
+       if ($h = opendir($filename))
        {
-               while (($file = readdir($h)) !== false) 
+               while (($file = readdir($h)) !== false)
                {
                        if (is_file("$filename/$file"))
                        unlink("$filename/$file");
@@ -201,10 +203,10 @@ function handle_delete()
                closedir($h);
        }
        rmdir($filename);
-       $filename = "$path_to_root/lang/$lang"; 
-       if ($h = opendir($filename)) 
+       $filename = "$path_to_root/lang/$lang";
+       if ($h = opendir($filename))
        {
-               while (($file = readdir($h)) !== false) 
+               while (($file = readdir($h)) !== false)
                {
                        if (is_file("$filename/$file"))
                        unlink("$filename/$file");
@@ -231,7 +233,7 @@ function display_languages()
        global $table_style, $installed_languages;
 
        $lang = $_SESSION["language"]->code;
-       
+
        echo "
                <script language='javascript'>
                function deleteLanguage(id) {
@@ -282,7 +284,7 @@ function display_language_edit($selected_id)
                $n = $selected_id;
        else
                $n = count($installed_languages);
-       
+
        start_form(true, true);
 
        echo "
@@ -292,10 +294,10 @@ function display_language_edit($selected_id)
                        document.forms[0].submit()
                }
                </script>";
-       
+
        start_table($table_style2);
 
-       if ($selected_id != -1) 
+       if ($selected_id != -1)
        {
                $conn = $installed_languages[$selected_id];
                $_POST['code'] = $conn['code'];
@@ -306,7 +308,7 @@ function display_language_edit($selected_id)
                else
                        $_POST['rtl'] = false;
                hidden('selected_id', $selected_id);
-       } 
+       }
        text_row_ex(_("Language"), 'code', 20);
        text_row_ex(_("Name"), 'name', 20);
        text_row_ex(_("Encoding"), 'encoding', 20);
@@ -318,7 +320,7 @@ function display_language_edit($selected_id)
 
        end_table(0);
        display_note(_("Select your language files from your local harddisk."), 0, 1);
-       echo "<center><input onclick='javascript:updateLanguage()' type='button' style='width:150' value='". _("Save"). "'>";
+       echo "<center><input onclick='javascript:updateLanguage()' type='button' style='width:150px' value='". _("Save"). "'></center>";
 
 
        end_form();
@@ -329,18 +331,18 @@ function display_language_edit($selected_id)
 
 if (isset($_GET['c']))
 {
-       if ($_GET['c'] == 'df') 
+       if ($_GET['c'] == 'df')
        {
                handle_delete();
        }
 
-       if ($_GET['c'] == 'u') 
+       if ($_GET['c'] == 'u')
        {
-               if (handle_submit()) 
+               if (handle_submit())
                {
                        //meta_forward($_SERVER['PHP_SELF']);
                }
-       }       
+       }
 }
 
 //---------------------------------------------------------------------------------------------
index 76cb83635f02bdb4b56cc63696389db1190d1616..2dfde4b9bd5805e6e8696a182696c476c59c682f 100644 (file)
@@ -13,15 +13,15 @@ include_once($path_to_root . "/modules/installed_modules.php");
 include_once($path_to_root . "/includes/ui.inc");
 
 $tabs = array('orders', 'AP', 'stock', 'manuf', 'proj', 'GL', 'system');
-$names = array(_("Sales"), _("Purchases"), _("Items and Inventory"), _("Manufacturing"), 
+$names = array(_("Sales"), _("Purchases"), _("Items and Inventory"), _("Manufacturing"),
        _("Dimensions"), _("Banking and General Ledger"), _("Setup"));
-       
+
 //---------------------------------------------------------------------------------------------
 
 if (isset($_GET['selected_id']))
 {
        $selected_id = $_GET['selected_id'];
-} 
+}
 elseif (isset($_POST['selected_id']))
 {
        $selected_id = $_POST['selected_id'];
@@ -55,9 +55,9 @@ function tab_list_row($label, $name, $selected)
        {
                if ($selected == $tabs[$i])
                        echo "<option selected value='".$tabs[$i]."'>" . $names[$i]. "</option>\n";
-               else    
+               else
                        echo "<option value='".$tabs[$i]."'>" . $names[$i]. "</option>\n";
-       }               
+       }
        echo "</select></td>\n";
        echo "</tr>\n";
 }
@@ -66,6 +66,8 @@ function tab_list_row($label, $name, $selected)
 
 function check_data()
 {
+       if ($_POST['name'] == "" || $_POST['path'] == "")
+               return false;
        return true;
 }
 
@@ -83,15 +85,15 @@ function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false)
    if (!is_array($aryData) || !$strIndex || !$strSortBy)
        //    return the array
        return $aryData;
-       
+
    //    create our temporary arrays
    $arySort = $aryResult = array();
-   
+
    //    loop through the array
    foreach ($aryData as $aryRow)
        //    set up the value in the array
        $arySort[$aryRow[$strIndex]] = $aryRow[$strSortBy];
-       
+
    //    apply the natural sort
    natsort($arySort);
 
@@ -99,7 +101,7 @@ function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false)
    if ($strSortType=="desc")
        //    reverse the array
        arsort($arySort);
-       
+
    //    loop through the sorted and original data
    foreach ($arySort as $arySortKey => $arySorted)
        foreach ($aryData as $aryOriginal)
@@ -110,7 +112,7 @@ function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false)
 
    //    return the return
    return $aryResult;
-} 
+}
 
 function write_modules()
 {
@@ -119,9 +121,9 @@ function write_modules()
        $mods = array_natsort($installed_modules, 'tab', 'tab');
        $installed_modules = $mods;
        //reset($installed_languages);
-       $n = count($installed_modules); 
+       $n = count($installed_modules);
        $msg = "<?php\n\n";
-       
+
        $msg .= "/*****************************************************************\n";
        $msg .= "External modules for FrontAccounting\n";
        $msg .= "******************************************************************/\n";
@@ -145,16 +147,16 @@ function write_modules()
 
        $filename = $path_to_root . "/modules/installed_modules.php";
        // Check if the file exists and is writable first.
-       if (file_exists($filename) && is_writable($filename)) 
+       if (file_exists($filename) && is_writable($filename))
        {
-               if (!$zp = fopen($filename, 'w')) 
+               if (!$zp = fopen($filename, 'w'))
                {
                        display_error(_("Cannot open the modules file - ") . $filename);
                        return false;
-               } 
-               else 
+               }
+               else
                {
-                       if (!fwrite($zp, $msg)) 
+                       if (!fwrite($zp, $msg))
                        {
                                display_error(_("Cannot write to the modules file - ") . $filename);
                                fclose($zp);
@@ -163,8 +165,8 @@ function write_modules()
                        // Close file
                        fclose($zp);
                }
-       } 
-       else 
+       }
+       else
        {
                display_error(_("The modules file ") . $filename . _(" is not writable. Change its permissions so it is, then re-run the operation."));
                return false;
@@ -186,11 +188,11 @@ function handle_submit()
        $installed_modules[$id]['tab'] = $_POST['tab'];
        $installed_modules[$id]['name'] = $_POST['name'];
        $installed_modules[$id]['path'] = $_POST['path'];
-       $directory = $path_to_root . "/modules/" . $_POST['path'];      
+       $directory = $path_to_root . "/modules/" . $_POST['path'];
        if (!file_exists($directory))
        {
                mkdir($directory);
-       }       
+       }
        if (is_uploaded_file($_FILES['uploadfile']['tmp_name']))
        {
                $installed_modules[$id]['filename'] = $_FILES['uploadfile']['name'];
@@ -223,13 +225,13 @@ function handle_delete()
 {
        global  $path_to_root, $installed_modules;
 
-       $id = $_GET['id'];      
+       $id = $_GET['id'];
 
        $path = $installed_modules[$id]['path'];
-       $filename = "$path_to_root/modules/$path";      
-       if ($h = opendir($filename)) 
+       $filename = "$path_to_root/modules/$path";
+       if ($h = opendir($filename))
        {
-               while (($file = readdir($h)) !== false) 
+               while (($file = readdir($h)) !== false)
                {
                        if (is_file("$filename/$file"))
                        unlink("$filename/$file");
@@ -294,7 +296,7 @@ function display_module_edit($selected_id)
                $n = $selected_id;
        else
                $n = count($installed_modules);
-       
+
        start_form(true, true);
 
        echo "
@@ -304,10 +306,10 @@ function display_module_edit($selected_id)
                        document.forms[0].submit()
                }
                </script>";
-       
+
        start_table($table_style2);
 
-       if ($selected_id != -1) 
+       if ($selected_id != -1)
        {
                $mod = $installed_modules[$selected_id];
                $_POST['tab']  = $mod['tab'];
@@ -316,7 +318,7 @@ function display_module_edit($selected_id)
                $_POST['filename'] = $mod['filename'];
                hidden('selected_id', $selected_id);
                hidden('filename', $_POST['filename']);
-       } 
+       }
        tab_list_row(_("Menu Tab"), 'tab', null);
        text_row_ex(_("Name"), 'name', 30);
        text_row_ex(_("Folder"), 'path', 20);
@@ -326,7 +328,7 @@ function display_module_edit($selected_id)
 
        end_table(0);
        display_note(_("Select your module PHP file from your local harddisk."), 0, 1);
-       echo "<center><input onclick='javascript:updateModule()' type='button' style='width:150' value='". _("Save"). "'>";
+       echo "<center><input onclick='javascript:updateModule()' type='button' style='width:150px' value='". _("Save"). "'></center>";
 
 
        end_form();
@@ -337,18 +339,18 @@ function display_module_edit($selected_id)
 
 if (isset($_GET['c']))
 {
-       if ($_GET['c'] == 'df') 
+       if ($_GET['c'] == 'df')
        {
                handle_delete();
        }
 
-       if ($_GET['c'] == 'u') 
+       if ($_GET['c'] == 'u')
        {
-               if (handle_submit()) 
+               if (handle_submit())
                {
                        //meta_forward($_SERVER['PHP_SELF']);
                }
-       }       
+       }
 }
 
 //---------------------------------------------------------------------------------------------
index 5ece97ad248abd1f369b7035b2e081e3162499fa..2f0cce3cffc70356bf5516c03c2c3e3886a3b247 100644 (file)
@@ -18,7 +18,7 @@ page(_("Exchange Rates"), false, false, "", $js);
 if (isset($_GET['selected_id']))
 {
        $selected_id = $_GET['selected_id'];
-} 
+}
 elseif (isset($_POST['selected_id']))
 {
        $selected_id = $_POST['selected_id'];
@@ -28,7 +28,7 @@ else
 //---------------------------------------------------------------------------------------------
 function check_data()
 {
-       if (!is_date($_POST['date_'])) 
+       if (!is_date($_POST['date_']))
        {
                display_error( _("The entered date is invalid."));
                set_focus('date_');
@@ -59,13 +59,13 @@ function handle_submit()
        if (!check_data())
                return false;
 
-       if ($selected_id != "") 
+       if ($selected_id != "")
        {
 
                update_exchange_rate($_POST['curr_abrev'], $_POST['date_'],
                 input_num('BuyRate'), input_num('BuyRate'));
-       } 
-       else 
+       }
+       else
        {
 
                add_exchange_rate($_POST['curr_abrev'], $_POST['date_'],
@@ -103,7 +103,7 @@ function display_rates($curr_code)
 
     $k = 0; //row colour counter
 
-    while ($myrow = db_fetch($result)) 
+    while ($myrow = db_fetch($result))
     {
 
                alt_table_row_color($k);
@@ -131,8 +131,8 @@ function display_rate_edit()
        if (isset($_POST['get_rate']))
        {
                $_POST['BuyRate'] = exrate_format(get_ecb_rate($_POST['curr_abrev']));
-       }       
-       if ($selected_id != "") 
+       }
+       if ($selected_id != "")
        {
                //editing an existing exchange rate
 
@@ -146,13 +146,13 @@ function display_rate_edit()
                hidden('curr_abrev', $_POST['curr_abrev']);
 
                label_row(_("Date to Use From:"), $_POST['date_']);
-       } 
-       else 
+       }
+       else
        {
                date_row(_("Date to Use From:"), 'date_');
        }
-       small_amount_row(_("Exchange Rate:"), 'BuyRate', null, '', 
-         submit('get_rate',_("Get")), user_exrate_dec());
+       small_amount_row(_("Exchange Rate:"), 'BuyRate', null, '',
+               submit('get_rate',_("Get"), false), user_exrate_dec());
 
        end_table(1);
 
@@ -172,10 +172,10 @@ function clear_data()
 
 //---------------------------------------------------------------------------------------------
 
-if (isset($_POST['ADD_ITEM']) || isset($_POST['UPDATE_ITEM'])) 
+if (isset($_POST['ADD_ITEM']) || isset($_POST['UPDATE_ITEM']))
 {
 
-       if (handle_submit()) 
+       if (handle_submit())
        {
                meta_forward($_SERVER['PHP_SELF']);
        }
@@ -183,7 +183,7 @@ if (isset($_POST['ADD_ITEM']) || isset($_POST['UPDATE_ITEM']))
 
 //---------------------------------------------------------------------------------------------
 
-if (isset($_GET['delete'])) 
+if (isset($_GET['delete']))
 {
 
        handle_delete();
@@ -201,7 +201,7 @@ echo _("Select a currency :") . "  ";
 currencies_list('curr_abrev', $_POST['curr_abrev'], true);
 
 // if currency sel has changed, clear the form
-if ($_POST['curr_abrev'] != get_global_curr_code()) 
+if ($_POST['curr_abrev'] != get_global_curr_code())
 {
        clear_data();
        $selected_id = "";
@@ -209,13 +209,13 @@ if ($_POST['curr_abrev'] != get_global_curr_code())
 
 set_global_curr_code($_POST['curr_abrev']);
 
-if (is_company_currency($_POST['curr_abrev'])) 
+if (is_company_currency($_POST['curr_abrev']))
 {
 
        display_note(_("The selected currency is the company currency."), 2);
        display_note(_("The company currency is the base currency so exchange rates cannot be set for it."), 1);
-} 
-else 
+}
+else
 {
 
     display_rates($_POST['curr_abrev']);
index 7d52f410bb77fbe25553f38681bbae94e6c27f99..b8f08e6ba22ab465f5ae73043d90fb9bde6a8bab 100644 (file)
@@ -99,10 +99,11 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js=""
        if (!headers_sent()){
                header("Content-type: text/html; charset='$encoding'");
        }
+       echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
        echo "<html dir='" . $_SESSION['language']->dir . "' >\n";
        echo "<head><title>$title</title>";
        $local_stylesheet = $_SESSION['language']->get_stylesheet();
-       echo "<meta http-equiv='Content-type' content='text/html'; charset='$encoding'>";
+       echo "<meta http-equiv='Content-type' content='text/html' charset='$encoding'>";
        echo "<link href='$local_path_to_root/themes/$theme/default.css' rel='stylesheet' type='text/css' /> \n";
        if (file_exists($local_path_to_root. "/".$local_stylesheet))
                echo "<link href='$local_path_to_root/$local_stylesheet' rel='stylesheet' type='text/css' /> \n";
index 026ad125a321fcd3ecf40392aa8b4c3cb4803038..9ba28f4964619c4b9ddad36d3e507c7c0046453a 100644 (file)
@@ -9,13 +9,13 @@
     | by Joe Hunt Consulting         |
        \--------------------------------------------------*/
 
-       function output_html($text) 
+       function output_html($text)
        {
          global $before_box;
          return  in_ajax() ? fmt_errors() : ($before_box.fmt_errors().$text);
        }
 
-       if (!isset($path_to_root)) 
+       if (!isset($path_to_root))
        {
                $path_to_root = ".";
        }
@@ -48,7 +48,7 @@
 
     //----------------------------------------------------------------------------------------
 
-       function kill_login() 
+       function kill_login()
        {
         session_unset();
                session_destroy();
@@ -56,7 +56,7 @@
 
        //----------------------------------------------------------------------------------------
 
-       function login_fail() 
+       function login_fail()
        {
         echo "<center><br><br><font size='5' color='red'><b>" . _("Incorrect Password") . "<b></font><br><br>";
         echo "<b>" . _("The user and password combination is not valid for the system.") . "<b><br><br>";
@@ -71,9 +71,9 @@
 
        //----------------------------------------------------------------------------------------
 
-       function check_page_security($page_security) 
+       function check_page_security($page_security)
        {
-               if (!$_SESSION["wa_current_user"]->check_user_access()) 
+               if (!$_SESSION["wa_current_user"]->check_user_access())
                {
                        echo "<br><br><br><center>";
                        echo "<b>" . _("Security settings have not been defined for your user account.");
                        exit;
                }
 
-               if (!$_SESSION["wa_current_user"]->can_access_page($page_security)) 
+               if (!$_SESSION["wa_current_user"]->can_access_page($page_security))
                {
                        page(_("Access denied"));
                        echo "<center><br><br><br><b>";
                        echo _("The security settings on your account do not permit you to access this function");
                        echo "</b>";
                        echo "<br><br><a href='javascript:history.go(-1)'>" . _("Back") . "</a>";
-                       echo "<br><br><br><br>";
+                       echo "<br><br><br><br></center>";
                        //echo '<script type="text/javascript">';
                        //echo 'alert("' . _("The security settings on your account do not permit you to access this function") . '");';
                        //echo 'history.go(-1)';
 
        //----------------------------------------------------------------------------------------
        if (!isset($_SESSION["wa_current_user"]) ||
-               (isset($_SESSION["wa_current_user"]) && !$_SESSION["wa_current_user"]->logged_in())) 
+               (isset($_SESSION["wa_current_user"]) && !$_SESSION["wa_current_user"]->logged_in()))
        {
 
                $_SESSION["wa_current_user"] = new current_user();
 
         // Show login screen
-        if (!isset($_POST["user_name_entry_field"]) or $_POST["user_name_entry_field"] == "") 
+        if (!isset($_POST["user_name_entry_field"]) or $_POST["user_name_entry_field"] == "")
         {
                include($path_to_root . "/access/login.php");
                $Ajax->redirect($path_to_root . "/access/login.php");
        // colect all error msgs
        set_error_handler('error_handler' /*, errtypes */);
 
-       if (isset($_POST["user_name_entry_field"])) 
+       if (isset($_POST["user_name_entry_field"]))
        {
                $succeed = $_SESSION["wa_current_user"]->login($_POST["company_login_name"],
                        $_POST["user_name_entry_field"],
                        md5($_POST["password"]));
 
-               if (!$succeed) 
+               if (!$succeed)
                {
                        // Incorrect password
                        login_fail();
     }*/
 
        //----------------------------------------------------------------------------------------
-    
+
        check_page_security($page_security);
 
 
index ad0c8a2468e65e787d7c96bfdbe64a615abdcb54..9d52934fad5fdf9e7fa6ece110d05efb4b446b12 100644 (file)
@@ -12,13 +12,13 @@ function start_form($multi=false, $sid=false, $action="", $name="")
        {
                if (strpos($action, "?"))
                        $action .= "&" . SID;
-               else    
+               else
                        $action .= "?" . SID;
-       }               
+       }
        if ($multi)
-               echo "<form enctype='multipart/form-data' method='post' action='$action' $name>\n";     
+               echo "<form enctype='multipart/form-data' method='post' action='$action' $name>\n";
        else
-               echo "<form method='post' action='$action' $name>\n";   
+               echo "<form method='post' action='$action' $name>\n";
 
 }
 
@@ -38,7 +38,7 @@ function start_table($extra="", $padding='2', $spacing='0')
        if ($extra != "")
                echo " $extra";
        echo " cellpadding=$padding cellspacing=$spacing>\n";
-}      
+}
 
 function end_table($breaks=0)
 {
@@ -52,7 +52,7 @@ function meta_forward($forward_to, $params="")
     global $Ajax;
        echo "<meta http-equiv='Refresh' content='0; url=$forward_to?$params'>\n";
        echo "<center><br>" . _("You should automatically be forwarded.");
-       echo " " . _("If this does not happen") . " " . "<a href='$forward_to'>" . _("click here") . "</a> " . _("to continue") . ".<br><br>\n";
+       echo " " . _("If this does not happen") . " " . "<a href='$forward_to'>" . _("click here") . "</a> " . _("to continue") . ".<br><br></center>\n";
        $Ajax->redirect($forward_to.'?'.$params);
        exit;
 }
@@ -66,7 +66,7 @@ function hyperlink_back($center=true)
        echo "<a href='javascript:goBack();'>"._("Back")."</a>\n";
        if ($center)
                echo "</center>";
-       echo "<br>";    
+       echo "<br>";
 }
 
 function hyperlink_no_params($target, $label, $center=true)
@@ -129,28 +129,28 @@ function alt_table_row_color(&$k)
        {
                echo "<tr class='oddrow'>\n";
                $k = 0;
-       } 
-       else 
+       }
+       else
        {
                echo "<tr class='evenrow'>\n";
                $k++;
        }
 }
 
-function table_section_title($msg) 
+function table_section_title($msg)
 {
        echo "<tr><td colspan=2 class='tableheader'>$msg</td><tr>\n";
 }
 
-function table_header($labels) 
+function table_header($labels)
 {
        start_row();
        foreach ($labels as $label)
                labelheader_cell($label);
-       end_row();      
+       end_row();
 }
 
-function edit_link_cell($param)        
+function edit_link_cell($param)
 {
        label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'>" . _("Edit") . "</a>", "nowrap");
 }
@@ -167,18 +167,18 @@ function edit_button_cell($name, $value)
 
 //-----------------------------------------------------------------------------------
 
-function start_row($param="") 
+function start_row($param="")
 {
        if ($param != "")
                echo "<tr $param>\n";
-       else    
+       else
                echo "<tr>\n";
 }
 
-function end_row() 
+function end_row()
 {
        echo "</tr>\n";
-}      
+}
 
 function br($num=1)
 {
@@ -201,10 +201,11 @@ function div_end()
 {
     global $ajax_divs, $Ajax;
 
-    if (count($ajax_divs)) {
-       $id = array_pop($ajax_divs);
-       $Ajax->addUpdate($id, $id, ob_get_flush());
-       echo "</div>"; 
+    if (count($ajax_divs))
+    {
+               $id = array_pop($ajax_divs);
+               $Ajax->addUpdate($id, $id, ob_get_flush());
+               echo "</div>";
     }
 }
 ?>
\ No newline at end of file
index 0f20919277ad65138640d96f9a08b12e3d4d5b1c..829ff753c98391b3f94b79f23f4aca357f267a2d 100644 (file)
@@ -1,10 +1,11 @@
 <?php
 
-function get_post($name, $dflt='') {
+function get_post($name, $dflt='')
+{
        return ((!isset($_POST[$name]) || $_POST[$name] === '') ? $dflt : $_POST[$name]);
 }
 //
-// Sets local POST value and adds Value to ajax posting if needed 
+// Sets local POST value and adds Value to ajax posting if needed
 //
 /*function set_post($name, $value, $ajax_trigger=true) {
     global $Ajax;
@@ -18,13 +19,16 @@ function get_post($name, $dflt='') {
 //    If var is found returns variable name with prefix stripped,
 //    and null or -1 otherwise.
 //
-function find_submit($prefix, $numeric=true) {
+function find_submit($prefix, $numeric=true)
+{
 
-    foreach($_POST as $postkey=>$postval ) {
-       if (strpos($postkey, $prefix) === 0) {
-               $id = substr($postkey, strlen($prefix));
-               return $numeric ? (int)$id : $id;
-       }
+    foreach($_POST as $postkey=>$postval )
+    {
+               if (strpos($postkey, $prefix) === 0)
+               {
+                       $id = substr($postkey, strlen($prefix));
+                       return $numeric ? (int)$id : $id;
+               }
     }
     return $numeric ? -1 : null;
 }
@@ -33,20 +37,25 @@ function find_submit($prefix, $numeric=true) {
 //
 //     Read numeric value from user formatted input
 //
-function input_num($postname=null) {
-       if (!isset($_POST[$postname])) 
-         return null;
+function input_num($postname=null)
+{
+       if (!isset($_POST[$postname]))
+               return null;
 
     return user_numeric($_POST[$postname]);
 }
 
 //---------------------------------------------------------------------------------
 
-function hidden($name, $value)
+function hidden($name, $value, $echo=true)
 {
-  global $Ajax;
-       echo "<input type=\"hidden\" name=\"$name\" value=\"$value\">\n";
+       global $Ajax;
+       $ret = "<input type=\"hidden\" name=\"$name\" value=\"$value\">";
        $Ajax->addUpdate($name, $name, $value);
+       if ($echo)
+               echo $ret."\n";
+       else
+               return $ret;
 }
 
 //---------------------------------------------------------------------------------
@@ -55,7 +64,7 @@ function submit($name, $value, $echo=true, $async=false)
 {
        default_focus($name);
        $submit_str = "<input type=\"submit\" class=\""
-           .($async ? 'ajaxsubmit' : 'inputsubmit') 
+           .($async ? 'ajaxsubmit' : 'inputsubmit')
            ."\" name=\"$name\"  id=\"$name\" value=\"$value\" >\n";
        if ($echo)
                echo $submit_str;
@@ -136,8 +145,8 @@ function submit_row($name, $value, $right=true, $extra="", $async=false)
 
 function button($name, $value, $onclick)
 {
-  default_focus($name);
-  echo "<input type=\"button\" class=\"inputsubmit\" name=\"$name\" value=\"$value\" onclick=\"$onclick\" />\n";
+       default_focus($name);
+       echo "<input type=\"button\" class=\"inputsubmit\" name=\"$name\" value=\"$value\" onclick=\"$onclick\" />\n";
 }
 
 function button_cell($name, $value, $onclick)
@@ -158,7 +167,7 @@ function check_value($name)
 
 function check($label, $name, $value, $submit_on_change=false)
 {
-  global $Ajax;
+       global $Ajax;
 
        default_focus($name);
        if ($label)
@@ -202,8 +211,9 @@ function labelheader_cell($label, $params="")
 function label_cell($label, $params="", $id=null)
 {
     global $Ajax;
-    
-       if(isset($id)) {
+
+       if(isset($id))
+       {
            $params .= " id='$id'";
            $Ajax->addUpdate($id, $id, $label);
        }
@@ -247,8 +257,8 @@ function label_row($label, $value, $params="", $params2="", $leftfill=0)
 {
        echo "<tr>";
        label_cells($label, $value, $params, $params2);
-       if($leftfill!=0)
-         echo "<td colspan=$leftfill></td>";
+       if ($leftfill!=0)
+               echo "<td colspan=$leftfill></td>";
        echo "</tr>\n";
 }
 
@@ -256,7 +266,7 @@ function label_row($label, $value, $params="", $params2="", $leftfill=0)
 
 function text_cells($label, $name, $value, $size="", $max="", $params="", $post_label="", $disabled="")
 {
-  global $Ajax;
+       global $Ajax;
 
        default_focus($name);
        if ($label != null)
@@ -276,7 +286,7 @@ function text_cells($label, $name, $value, $size="", $max="", $params="", $post_
 
 function text_cells_ex($label, $name, $size, $max=null, $init=null, $params=null, $post_label=null)
 {
-  global $Ajax;
+       global $Ajax;
 
        default_focus($name);
        if (!isset($_POST[$name]) || $_POST[$name] == "")
@@ -387,7 +397,7 @@ function percent_row($label, $name, $init=null)
 
        if (!isset($_POST[$name]) || $_POST[$name]=="")
        {
-                       $_POST[$name] = $init== null ? '' : $init;
+               $_POST[$name] = $init== null ? '' : $init;
        }
 
        small_amount_row($label, $name, $_POST[$name], null, "%", user_percent_dec());
@@ -395,10 +405,10 @@ function percent_row($label, $name, $init=null)
 
 function amount_cells_ex($label, $name, $size, $max=null, $init=null, $params=null, $post_label=null, $dec=null)
 {
-global $Ajax;
+       global $Ajax;
 
        if (!isset($dec))
-         $dec = user_price_dec();
+               $dec = user_price_dec();
        if (!isset($_POST[$name]) || $_POST[$name] == "")
        {
                if ($init)
@@ -449,16 +459,16 @@ function small_amount_row($label, $name, $init=null, $params=null, $post_label=n
 
 function qty_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
 {
-       if(!isset($dec))
-         $dec = user_qty_dec();
+       if (!isset($dec))
+               $dec = user_qty_dec();
 
        amount_cells_ex($label, $name, 15, 15, $init, $params, $post_label, $dec);
 }
 
 function qty_row($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
 {
-       if(!isset($dec))
-         $dec = user_qty_dec();
+       if (!isset($dec))
+               $dec = user_qty_dec();
 
        echo "<tr>";
        amount_cells($label, $name, $init, $params, $post_label, $dec);
@@ -467,8 +477,8 @@ function qty_row($label, $name, $init=null, $params=null, $post_label=null, $dec
 
 function small_qty_row($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
 {
-       if(!isset($dec))
-         $dec = user_qty_dec();
+       if (!isset($dec))
+               $dec = user_qty_dec();
 
        echo "<tr>";
        small_amount_cells($label, $name, $init, $params, $post_label, $dec);
@@ -486,8 +496,8 @@ function small_amount_cells($label, $name, $init=null, $params=null, $post_label
 
 function small_qty_cells($label, $name, $init=null, $params=null, $post_label=null, $dec=null)
 {
-  if (!isset($dec))
-         $dec = user_qty_dec();
+       if (!isset($dec))
+               $dec = user_qty_dec();
        amount_cells_ex($label, $name, 7, 12, $init, $params, $post_label, $dec);
 }
 
@@ -495,8 +505,8 @@ function small_qty_cells($label, $name, $init=null, $params=null, $post_label=nu
 
 function textarea_cells($label, $name, $value, $cols, $rows, $params="")
 {
-  global $Ajax;
-  
+       global $Ajax;
+
        default_focus($name);
        if ($label != null)
                echo "<td $params>$label</td>\n";
@@ -517,8 +527,8 @@ function textarea_row($label, $name, $value, $cols, $rows, $params="")
 
 function text_row_with_submit($label, $name, $value, $size, $max, $input_name, $input_value)
 {
-  global $Ajax;
-  
+       global $Ajax;
+
        default_focus($name);
        echo "<tr><td>$label</td>\n";
        echo "<td>";
index 50bcbfebbb12d9255267b7fe90f8757c17dd2bc4..8e424542bb2b6e15b8997303bff5102728c8a4f5 100644 (file)
@@ -1048,7 +1048,8 @@ function stock_units_list_row($label, $name, $value, $enabled=true)
 
        while($unit = db_fetch($result))
        {
-               if ($value == "") {
+               if ($value == "")
+               {
                        $_POST[$name] = $unit['abbr'];
                }
                $descr = $unit['name'];
@@ -1971,8 +1972,10 @@ function themes_list_row($label, $name, $value)
        $path = $path_to_root.'/themes/';
        $themes = array();
        $themedir = opendir($path);
-       while(false !== ($fname = readdir($themedir))) {
-           if($fname!='.' && $fname!='..' && $fname!='CVS' && is_dir($path.$fname)) {
+       while(false !== ($fname = readdir($themedir)))
+       {
+           if($fname!='.' && $fname!='..' && $fname!='CVS' && is_dir($path.$fname))
+           {
                        $themes[] =  $fname;
            }
        }
index 6ef7655f16cf8e38299946854f5f66a5c0635e7a..ee24d8edd9a5c0b297529330e05cb186b9d7e19d 100644 (file)
@@ -275,7 +275,7 @@ function get_trans_view_str($type, $trans_no, $label="")
 function exchange_rate_display($from_currency, $to_currency, $date_, $buttons=true)
 {
     global $Ajax;
-    
+
        if ($from_currency != $to_currency)
        {
                if ($buttons && isset($_POST['get_rate']))
@@ -319,7 +319,7 @@ function is_voided_display($type, $id, $label)
        echo "<tr><td align=center><font color=red>$label</font><br>";
        echo "<font color=red>" . _("Date Voided:") . " " . sql2date($void_entry["date_"]) . "</font><br>";
        if (strlen($void_entry["memo_"]) > 0)
-               echo "<center><font color=red>" . _("Memo:") . " " . $void_entry["memo_"] . "</font><br>";
+               echo "<center><font color=red>" . _("Memo:") . " " . $void_entry["memo_"] . "</font></center><br>";
        echo "</td></tr>";
        end_table(1);
 
@@ -460,7 +460,6 @@ function display_edit_tax_items($taxes, $columns, $tax_included, $leftspan=0)
 
 function display_footer_exit()
 {
-       global $path_to_root;
        br(2);
        end_page();
        exit;
@@ -593,7 +592,7 @@ function get_js_date_picker()
     $fpath = $comp_path.'/'.user_company().'/js_cache/'.'date_picker.js';
 
        $js = "<style>
-#CCIFrame { display: none; left: 0px; position: absolute; top: 0px; height: 250px; width: 250px; z-index: 99;}
+#CCIframe { display: none; left: 0px; position: absolute; top: 0px; height: 250px; width: 250px; z-index: 99;}
 #CC { position:absolute; background-color:#FFF; margin:0; padding:0; display:none; z-index: 100;}
 #CC table { font-family: arial, verdana, helvetica, sans-serif;font-size: 8pt; border-left: 1px solid #336; border-right: 1px solid #336;}
 #CC th { font-weight: normal;}
@@ -614,9 +613,9 @@ function get_js_date_picker()
 </style>
 ";
     add_js_source($js);
-    
+
     if (!file_exists($fpath)) {
-    
+
        global $dateseps, $date_system;
 
        $how = user_date_format();                              // 0 = us/ca, 1 = eu, au, nz, 2 = jp, sw
@@ -909,7 +908,7 @@ function CC() {
       }
       table += \"</tr>\";
     }
-    table += \"<tr class='header'><th colspan='7' style='padding: 3px;'><a href='javascript:hideCC();'>$back</a></td></tr>\";
+    table += \"<tr class='header'><th colspan='7' style='padding: 3px;text-align:center;'><a href='javascript:hideCC();'>$back</a></td></tr>\";
     table += \"</table>\";
     return table;
   }
@@ -1026,7 +1025,7 @@ document.write(\"<iframe id='CCIframe' src='javascript:false;' frameBorder='0' s
 document.write(\"<div id='CC'></div>\");";
 
      cache_js_file($fpath, $js);
-    } 
+    }
     add_js_ufile($fpath);
 
  return '';
index a77141e77f2affba99eae14014c1e2f2ff9fd63d..ecb965105737b9562a8eccf6505e527e856e0623 100644 (file)
@@ -110,7 +110,7 @@ function handle_process()
 
 if (isset($_POST['Process']))
 {
-       if (check_data()) 
+       if (check_data())
        {
                handle_process();
                $_POST['Cancel'] = 1;
@@ -190,9 +190,9 @@ function edit_allocations_for_transaction($type, $trans_no)
     if (count($_SESSION['alloc']->allocs) > 0)
     {
                start_table($table_style);
-               $th = array(_("Transaction Type"), _("#"), _("Date"), _("Due Date"), _("Amount"), 
+               $th = array(_("Transaction Type"), _("#"), _("Date"), _("Due Date"), _("Amount"),
                        _("Other Allocations"), _("This Allocation"), _("Left to Allocate"),'');
-               table_header($th);      
+               table_header($th);
 
         $k = $counter = $total_allocated = 0;
 
@@ -212,12 +212,12 @@ function edit_allocations_for_transaction($type, $trans_no)
            amount_cells(null, "amount" . $counter, price_format('amount' . $counter));
 
                $un_allocated = round($alloc_item->amount - $alloc_item->amount_allocated, 6);
-               hidden("un_allocated" . $counter, $un_allocated);
+               //hidden("un_allocated" . $counter, $un_allocated);
                amount_cell($un_allocated);
                        label_cell("<a href='#' name=Alloc$counter onclick='allocate_all(this.name.substr(5));return true;'>"
                                         . _("All") . "</a>");
                        label_cell("<a href='#' name=DeAll$counter onclick='allocate_none(this.name.substr(5));return true;'>"
-                                        . _("None") . "</a>");
+                                        . _("None") . "</a>".hidden("un_allocated" . $counter, $un_allocated, false));
 
 //                     label_cell("<a href='#' onclick='forms[0].amount$counter.value=forms[0].un_allocated$counter.value; return true;'>" . _("All") . "</a>");
 //                     label_cell("<a href='#' onclick='forms[0].amount$counter.value=0; return true;'>" . _("None") . "</a>");
@@ -226,20 +226,20 @@ function edit_allocations_for_transaction($type, $trans_no)
            $total_allocated += input_num('amount' . $counter);
            $counter++;
                }
-               
+
         label_row(_("Total Allocated"), number_format2($total_allocated,user_price_dec()),
                "colspan=6 align=right", "align=right id='total_allocated'");
         if (-$_SESSION['alloc']->amount - $total_allocated < 0)
         {
                $font1 = "<font color=red>";
                $font2 = "</font>";
-        }      
+        }
         else
                $font1 = $font2 = "";
-               $left_to_allocate = price_format(-$_SESSION['alloc']->amount - $total_allocated); 
-        label_row(_("Left to Allocate"), $font1 . $left_to_allocate . $font2, "colspan=6 align=right", 
+               $left_to_allocate = price_format(-$_SESSION['alloc']->amount - $total_allocated);
+        label_row(_("Left to Allocate"), $font1 . $left_to_allocate . $font2, "colspan=6 align=right",
                "nowrap align=right id='left_to_allocate'");
-               end_table();            
+               end_table();
 
                hidden('TotalNumberOfAllocs', $counter);
 //             hidden('left_to_allocate', $left_to_allocate);
@@ -248,8 +248,8 @@ function edit_allocations_for_transaction($type, $trans_no)
                echo "&nbsp;";
                submit('Process', _("Process"));
                echo "&nbsp;";
-       } 
-       else 
+       }
+       else
        {
        display_note(_("There are no unsettled transactions to allocate."), 0, 1);
        echo "<center>";
index a95887f51c448117894edae0714fac741721f52e..74c0573ebbc9356f78e80354d4c695a4faa06fa6 100644 (file)
@@ -176,8 +176,6 @@ function edit_allocations_for_transaction($type, $trans_no)
 {
        global $table_style;
 
-       start_form(false, true);
-
     display_heading(sprintf(_("Allocation of %s # %d"), systypes::name($_SESSION['alloc']->type),$_SESSION['alloc']->trans_no));
 
     display_heading($_SESSION['alloc']->person_name);
@@ -187,6 +185,8 @@ function edit_allocations_for_transaction($type, $trans_no)
 
     echo "<br>";
 
+       start_form(false, true);
+
     if (count($_SESSION['alloc']->allocs) > 0)
     {
                start_table($table_style);
@@ -214,13 +214,15 @@ function edit_allocations_for_transaction($type, $trans_no)
            amount_cells(null, 'amount' . $counter, $_POST['amount' . $counter]);
 
                $un_allocated = round($allocn_item->amount - $allocn_item->amount_allocated, 6);
-               hidden("un_allocated" . $counter, $un_allocated);
+               //hidden("un_allocated" . $counter, $un_allocated);
                amount_cell($un_allocated);
 
-                       label_cell("<a href='#' name=Alloc$counter onclick='allocate_all(this.name.substr(5));return true;'>"
+                       label_cell("<a href='#' name='Alloc$counter' onclick='allocate_all(this.name.substr(5));return true;'>"
                                         . _("All") . "</a>");
-                       label_cell("<a href='#' name=DeAll$counter onclick='allocate_none(this.name.substr(5));return true;'>"
-                                        . _("None") . "</a>");
+                       //label_cell("<a href='#' name='DeAll$counter' onclick='allocate_none(this.name.substr(5));return true;'>"
+                       //               . _("None") . "</a>");
+                       label_cell("<a href='#' name='DeAll$counter' onclick='allocate_none(this.name.substr(5));return true;'>"
+                                        . _("None") . "</a>".hidden("un_allocated" . $counter, $un_allocated, false));
                        end_row();
 
            $total_allocated += input_num('amount' . $counter);
@@ -246,14 +248,14 @@ function edit_allocations_for_transaction($type, $trans_no)
 //             hidden('left_to_allocate', $left_to_allocate);
                submit_center_first('UpdateDisplay', _("Update"));
                submit('Process', _("Process"));
+               submit_center_last('Cancel', _("Back to Allocations"));
        }
        else
        {
        display_note(_("There are no unsettled transactions to allocate."), 0, 1);
+               submit_center('Cancel', _("Back to Allocations"));
     }
 
-       submit_center_last('Cancel', _("Back to Allocations"));
-
        end_form();
 }
 
index 6b03ce0e66821bfdd81cfada0ac99ae2f2730fd3..a7f41e33d551f12e4adcc7151b159aad9c88f551 100644 (file)
@@ -44,6 +44,8 @@ function write_credit_note($credit_note, $write_off_acc)
 
 //     $sales_order=$invoice->order_no;        //?
 //    if (is_array($sales_order)) $sales_order = $sales_order[0]; //?
+       if (!isset($credit_note->order_no))
+               $credit_note->order_no = 0;
 
        /*Now insert the Credit Note into the debtor_trans table with the allocations as calculated above*/
        // all amounts in debtor's currency
index 62cc4e9d694040fe2449db002acf3d98624a5c4e..5606cbf83df1f5c45328f87fa5787170d9f272f5 100644 (file)
@@ -73,20 +73,20 @@ function get_transactions()
 
        if (isset($_POST['filterType']) && $_POST['filterType'] != reserved_words::get_all())
        {
-               if ($_POST['filterType'] == '1' || $_POST['filterType'] == '2') 
+               if ($_POST['filterType'] == '1' || $_POST['filterType'] == '2')
                {
                        $sql .= " AND ".TB_PREF."debtor_trans.type = 10 ";
-               } 
-               elseif ($_POST['filterType'] == '3') 
+               }
+               elseif ($_POST['filterType'] == '3')
                {
                        $sql .= " AND ".TB_PREF."debtor_trans.type = " . systypes::cust_payment();
-               } 
-               elseif ($_POST['filterType'] == '4') 
+               }
+               elseif ($_POST['filterType'] == '4')
                {
                        $sql .= " AND ".TB_PREF."debtor_trans.type = 11 ";
                }
 
-       if ($_POST['filterType'] == '2') 
+       if ($_POST['filterType'] == '2')
        {
                $today =  date2sql(Today());
                $sql .= " AND ".TB_PREF."debtor_trans.due_date < '$today'
@@ -100,7 +100,7 @@ function get_transactions()
        }
 
 
-       if (!check_value('showSettled')) 
+       if (!check_value('showSettled'))
        {
                $sql .= " AND (round(abs(".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + "
                .TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + "
@@ -140,14 +140,14 @@ table_header($th);
 $j = 1;
 $k = 0; //row colour counter
 $over_due = false;
-while ($myrow = db_fetch($result)) 
+while ($myrow = db_fetch($result))
 {
 
        if ($myrow['OverDue'] == 1 && (abs($myrow["TotalAmount"]) - $myrow["Allocated"] != 0))
        {
                start_row("class='overduebg'");
                $over_due = true;
-       } 
+       }
        else
                alt_table_row_color($k);
 
@@ -166,20 +166,20 @@ while ($myrow = db_fetch($result))
 
        if ($myrow["type"] == 10)
                $due_date_str = sql2date($myrow["due_date"]);
-       elseif ($myrow["type"] == 11 && $myrow['TotalAmount'] < 0) 
+       elseif ($myrow["type"] == 11 && $myrow['TotalAmount'] > 0)
        {
                /*its a credit note which could have an allocation */
                $allocations_str = $allocations;
 
-       } 
-       elseif ($myrow["type"] == systypes::cust_payment() && 
-               ($myrow['TotalAmount'] + $myrow['Allocated']) < 0) 
+       }
+       elseif ($myrow["type"] == systypes::cust_payment() &&
+               ($myrow['TotalAmount'] + $myrow['Allocated']) > 0)
        {
                /*its a receipt  which could have an allocation*/
                $allocations_str = $allocations;
 
-       } 
-       elseif ($myrow["type"] == systypes::cust_payment() && $myrow['TotalAmount'] > 0) 
+       }
+       elseif ($myrow["type"] == systypes::cust_payment() && $myrow['TotalAmount'] < 0)
        {
                /*its a negative receipt */
        }
@@ -195,7 +195,7 @@ while ($myrow = db_fetch($result))
        {
                label_cell($myrow["CustName"]);
                label_cell($myrow["CustCurrCode"]);
-       }       
+       }
        display_debit_or_credit_cells($myrow["TotalAmount"]);
        amount_cell(abs($myrow["Allocated"]));
        amount_cell(abs($myrow["TotalAmount"]) - $myrow["Allocated"]);
@@ -217,7 +217,7 @@ while ($myrow = db_fetch($result))
 end_table(1);
 if ($over_due)
        display_note(_("Marked items are overdue."), 0, 1, "class='overduefg'");
-       
+
 end_page();
 
 ?>
index 1dfa60ab876b284fb0abd80f570eea28b222e3af..eb454f626e2c843b18d30cb1a63df01a27fa4673 100644 (file)
@@ -19,7 +19,7 @@
 body {
        font-family: Verdana, Arial, Helvetica;
        background: #518fad;
-       font-size: 10px;        
+       font-size: 10px;
        margin: 5px 0 0 5px;
        padding: 0;
 }
@@ -29,6 +29,10 @@ tr, td, th {
        line-height: 19px;
 }
 
+tr {
+       text-align: left;
+}
+
 textarea {
        font-size: 12px;
 }
@@ -48,7 +52,7 @@ input.small {
 
 a {
        color: #0000bb;
-       font-size: 11px;        
+       font-size: 11px;
        text-decoration: none;
 }
 
@@ -93,7 +97,7 @@ a:hover {
        border: 0;
        margin: 0;
        padding: 0;
-       text-align: right;
+       /*text-align: right;*/
 }
 
 .quick_menu_selected{
@@ -108,18 +112,18 @@ a:hover {
 }
 
 .logoutBar {
-       padding-right: 1em; 
-       background: #a7d6ce; 
-       color: black; 
-       border-bottom: 1px solid #8cacbb; 
+       padding-right: 1em;
+       background: #a7d6ce;
+       color: black;
+       border-bottom: 1px solid #8cacbb;
        width: 100%;
 }
 
 .bottomBar {
-       padding-right: 1em; 
-       background: #a7d6ce; 
-       color: black; 
-       border-bottom: 1px solid #8cacbb; 
+       padding-right: 1em;
+       background: #a7d6ce;
+       color: black;
+       border-bottom: 1px solid #8cacbb;
        width: 100%;
 }
 
@@ -129,11 +133,11 @@ a:hover {
 }
 
 .bottomBar2 {
-       padding-right: 1em; 
-       background: #a7d6ce; 
-       color: black; 
-       border-top: 1px solid #8cacbb; 
-       border-bottom: 1px solid #8cacbb; 
+       padding-right: 1em;
+       background: #a7d6ce;
+       color: black;
+       border-top: 1px solid #8cacbb;
+       border-bottom: 1px solid #8cacbb;
        width: 100%;
 }
 
@@ -142,16 +146,16 @@ a:hover {
 }
 
 div.logoutBar {
-       padding-right: 1em; 
-       background: #a7d6ce; 
-       color: black; 
-       border-bottom: 1px solid #8cacbb; 
+       padding-right: 1em;
+       background: #a7d6ce;
+       color: black;
+       border-bottom: 1px solid #8cacbb;
        text-align: right;
 }
 div.logoutBar a {
-       font-weight: normal; 
-       margin-left: 1em; 
-       color: #436976; 
+       font-weight: normal;
+       margin-left: 1em;
+       color: #436976;
        background-color: transparent;
 }
 div.logoutBar img {
@@ -159,34 +163,34 @@ div.logoutBar img {
 }
 
 div.tabs {
-       padding: 0.5em 0 0 0;
+       padding: 3px 0 0 0;
        background: none transparent scroll repeat 0% 0%;
-       white-space: nowrap; 
-       border-collapse: collapse;      
-       border-bottom: 1px solid #8cacbb;               
+       white-space: nowrap;
+       border-collapse: collapse;
+       border-bottom: 1px solid #8cacbb;
 
 }
 div.tabs a {
-       border: 1px solid #8cacbb; 
-       padding: 0 1em 3px 1em; 
-       font-weight: normal; 
+       border: 1px solid #8cacbb;
+       padding: 3px 10px;
+       font-weight: normal;
        background: white scroll repeat 0% 0%;
-       color: #436976; 
+       color: #436976;
        margin-right: 0.0em;
        height: 1.0em;
 }
 div.tabs a.selected {
-       border-top: 1px solid #8cacbb; 
-       border-right: 1px solid #8cacbb; 
+       border-top: 1px solid #8cacbb;
+       border-right: 1px solid #8cacbb;
        border-bottom:  1px solid #dee7ec;
-       border-left: 1px solid #8cacbb; 
-       font-weight: normal; 
-       background: #a7d6ce; 
+       border-left: 1px solid #8cacbb;
+       font-weight: normal;
+       background: #a7d6ce;
        color: #436976;
 }
 div.tabs a:hover {
-       background: #a7d6ce; 
-       color: #436976; 
+       background: #a7d6ce;
+       color: #436976;
 }
 
 .menu_group {
@@ -194,7 +198,7 @@ div.tabs a:hover {
        padding: 0px;
        color: #000000;
        background-color: #a7d6ce;
-       padding-left: 3px; 
+       padding-left: 3px;
        font-weight: bold;
 }
 
@@ -237,30 +241,30 @@ div.tabs a:hover {
 
 .titletext {
        font-weight: bold;
-       font-size: 13px;        
+       font-size: 13px;
        border-bottom: 1px solid #8cacbb;
        padding: 5px;
 }
 
 .headingtext {
        font-weight: bold;
-       font-size: 13;  
+       font-size: 13px;
        color: black;
 }
 
 .headingtext2 {
-       font-size: 13px;        
+       font-size: 13px;
        color: black;
 }
 
 .headingtext3 {
        font-weight: bold;
-       font-size: 10px;        
+       font-size: 10px;
        color: black;
 }
 
 .errortext {
-       font-size: 13px;        
+       font-size: 13px;
        color: #ff0000;
        font-weight: bold;
 }
@@ -268,7 +272,7 @@ div.tabs a:hover {
 .inputsubmit {
        font-size: 8pt;
        border: 1px solid #0066cc;
-       padding: 1px 4px; 
+       padding: 1px 4px;
 }
 
 .ajaxsubmit {
@@ -283,32 +287,32 @@ div.tabs a:hover {
 
 .evenrow {
        background-color: #dddddd;
-}      
+}
 
 .overduebg {
        background-color: #dd7777;
-}      
+}
 
 .overduefg {
        color: #dd7777;
-}      
+}
 
 .currentfg {
        color: #ff6666;
-}      
+}
 
 .redfg {
        color: red;
        font-weight: bold;
-}      
+}
 
 .settledbg {
        background-color: #00bb00;
-}      
+}
 
 .settledfg {
        color: #00bb00;
-}      
+}
 
 .inquirybg {
        background-color: #fdfeef;
@@ -326,13 +330,13 @@ div.tabs a:hover {
        padding: 3px;
        border: 1px solid #8cacbb;
        border-collapse: collapse;
-}      
+}
 
 .tablestyle2 {
        padding: 0 3px;
        border: 1px solid #ccc;
        border-collapse: collapse;
-}      
+}
 .tablestyle_noborder {
        padding: 3px;
 }
index b897fa694dae2ca8e483f456f6358dd93844579a..3281ea0b061838108673ec0435a8b7449320058b 100644 (file)
@@ -19,7 +19,7 @@
 body {
        font-family: Verdana, Arial, Helvetica;
        background: #60687b;
-       font-size: 10px;        
+       font-size: 10px;
        margin: 5px 0 0 5px;
        padding: 0;
 }
@@ -29,13 +29,17 @@ tr, td, th {
        line-height: 19px;
 }
 
+tr {
+       text-align: left;
+}
+
 textarea {
        font-size: 12px;
 }
 
 input, select {
        font-size: 11px;
-       padding: 1px; 
+       padding: 1px;
 }
 
 input.big {
@@ -48,7 +52,7 @@ input.small {
 
 a {
        color: #0000bb;
-       font-size: 11px;        
+       font-size: 11px;
        text-decoration: none;
 }
 
@@ -94,7 +98,7 @@ a:hover {
        border: 0;
        margin: 0;
        padding: 0;
-       text-align: right;
+       /*text-align: right;*/
 }
 
 .quick_menu_selected {
@@ -109,18 +113,18 @@ a:hover {
 }
 
 .logoutBar {
-       padding-right: 1em; 
-       background: #e4ecec; 
-       color: black; 
-       border-bottom: 1px solid #cccccc; 
+       padding-right: 1em;
+       background: #e4ecec;
+       color: black;
+       border-bottom: 1px solid #cccccc;
        width: 100%;
 }
 
 .bottomBar {
-       padding-right: 1em; 
-       background: #e4ecec; 
-       color: black; 
-       border-bottom: 1px solid #cccccc; 
+       padding-right: 1em;
+       background: #e4ecec;
+       color: black;
+       border-bottom: 1px solid #cccccc;
        width: 100%;
 }
 
@@ -130,11 +134,11 @@ a:hover {
 }
 
 .bottomBar2 {
-       padding-right: 1em; 
-       background: #e4ecec; 
-       color: black; 
-       border-top: 1px solid #cccccc; 
-       border-bottom: 1px solid #cccccc; 
+       padding-right: 1em;
+       background: #e4ecec;
+       color: black;
+       border-top: 1px solid #cccccc;
+       border-bottom: 1px solid #cccccc;
        width: 100%;
 }
 
@@ -143,16 +147,16 @@ a:hover {
 }
 
 div.logoutBar {
-       padding-right: 1em; 
-       background: #e4ecec; 
-       color: black; 
-       border-bottom: 1px solid #cccccc; 
+       padding-right: 1em;
+       background: #e4ecec;
+       color: black;
+       border-bottom: 1px solid #cccccc;
        text-align: right;
 }
 div.logoutBar a {
-       font-weight: normal; 
-       margin-left: 1em; 
-       color: #436976; 
+       font-weight: normal;
+       margin-left: 1em;
+       color: #436976;
        background-color: transparent;
 }
 div.logoutBar img {
@@ -160,38 +164,38 @@ div.logoutBar img {
 }
 
 div.tabs {
-       padding: 0.5em 0 0 0; 
-       background: none transparent scroll repeat 0% 0%; 
-       white-space: nowrap; 
-       border-collapse: collapse;      
-       border-bottom: 1px solid #cccccc;               
+       padding: 3px 0 0 0;
+       background: none transparent scroll repeat 0% 0%;
+       white-space: nowrap;
+       border-collapse: collapse;
+       border-bottom: 1px solid #cccccc;
 
 }
 div.tabs a {
-       border: 1px solid #cccccc; 
-       padding: 0 1em 3px 1em; 
-       font-weight: normal; 
-       background: white scroll repeat 0% 0%; 
-       color: #436976; 
-       margin-right: 0.0em; 
+       border: 1px solid #cccccc;
+       padding: 3px 10px;
+       font-weight: normal;
+       background: white scroll repeat 0% 0%;
+       color: #436976;
+       margin-right: 0.0em;
        height: 1.0em;
 }
 div.tabs a.selected {
-       border-top: 1px solid #cccccc; 
-       border-right: 1px solid #cccccc; 
+       border-top: 1px solid #cccccc;
+       border-right: 1px solid #cccccc;
        border-bottom: 1px solid #e4ecec;
-       border-left: 1px solid #cccccc; 
-       font-weight: normal; 
-       background: #e4ecec; 
-       color: #436976; 
+       border-left: 1px solid #cccccc;
+       font-weight: normal;
+       background: #e4ecec;
+       color: #436976;
 }
 div.tabs a:hover {
-       border-top-color: #cccccc; 
+       border-top-color: #cccccc;
        border-right-color: #cccccc;
-       border-bottom-color: #e4ecec; 
-       border-left-color: #cccccc; 
-       background: #e4ecec; 
-       color: #436976; 
+       border-bottom-color: #e4ecec;
+       border-left-color: #cccccc;
+       background: #e4ecec;
+       color: #436976;
 }
 
 .menu_group {
@@ -199,7 +203,7 @@ div.tabs a:hover {
        padding: 0px;
        color: #455372;
        background-color: #e4ecec;
-       PADDING-LEFT: 3px; 
+       PADDING-LEFT: 3px;
        font-weight: bold;
 }
 
@@ -242,7 +246,7 @@ div.tabs a:hover {
 
 .titletext {
        font-weight: bold;
-       font-size: 13px;        
+       font-size: 13px;
        color: #455372;
        border-bottom: 1px solid #cccccc;
        padding: 5px;
@@ -250,23 +254,23 @@ div.tabs a:hover {
 
 .headingtext {
        font-weight: bold;
-       font-size: 13px;        
+       font-size: 13px;
        color: #455372;
 }
 
 .headingtext2 {
-       font-size: 13px;        
+       font-size: 13px;
        color: #455372;
 }
 
 .headingtext3 {
        font-weight: bold;
-       font-size: 10px;        
+       font-size: 10px;
        color: #455372;
 }
 
 .errortext {
-       font-size: 13px;        
+       font-size: 13px;
        color: #ff0000;
        font-weight: bold;
 }
@@ -274,13 +278,13 @@ div.tabs a:hover {
 .inputsubmit {
        font-size: 11px;
        border: 1px solid #0066cc;
-       padding: 1px 4px; 
+       padding: 1px 4px;
 }
 
 .ajaxsubmit {
        font-size: 11px;
        border: 1px solid #0066cc;
-       padding: 1px 4px; 
+       padding: 1px 4px;
 }
 
 .oddrow {
@@ -289,32 +293,32 @@ div.tabs a:hover {
 
 .evenrow {
        background-color: #eaedf1;
-}      
+}
 
 .overduebg {
        background-color: pink;
-}      
+}
 
 .overduefg {
        color: #dd7777;
-}      
+}
 
 .currentfg {
        color: #ff6666;
-}      
+}
 
 .redfg {
        color: red;
        font-weight: bold;
-}      
+}
 
 .settledbg {
        background-color: #00bb00;
-}      
+}
 
 .settledfg {
        color: #00bb00;
-}      
+}
 
 .inquirybg {
        background-color: #fdfeef;
@@ -332,13 +336,13 @@ div.tabs a:hover {
        padding: 3px;
        border: 1px solid #cccccc;
        border-collapse: collapse;
-}      
+}
 
 .tablestyle2 {
        padding: 0 3px;
        border: 1px solid #ccc;
        border-collapse: collapse;
-}      
+}
 .tablestyle_noborder {
        padding: 3px;
 }
@@ -388,12 +392,12 @@ input.amount {
 }
 
 ul.ajaxtabs{
-       padding: 3px 0 0 0; 
+       padding: 3px 0 0 0;
        margin: 3px 3px 0 3px;
        font: 12px Tahoma,Verdana;
        font-weight: bold;
 }
+
 ul.ajaxtabs li{
        list-style: none;
        margin: 0;
index b2cc2ca1b543d0b9925a64f068c6fd6ac5801665..01b5e993d7e3adb492d39a50a51d4c535fdee6b4 100644 (file)
@@ -29,6 +29,10 @@ tr, td, th {
        line-height: 19px;
 }
 
+tr {
+       text-align: left;
+}
+
 textarea {
        font-size: 12px;
 }
@@ -93,7 +97,7 @@ a:hover {
        border: 0;
        margin: 0;
        padding: 0;
-       text-align: right;
+       /*text-align: right;*/
 }
 
 .quick_menu_selected {
@@ -159,7 +163,7 @@ div.logoutBar img {
 }
 
 div.tabs {
-       padding: 0.5em 0 0 0;
+       padding: 3px 0 0 0;
        background: none transparent scroll repeat 0% 0%;
        white-space: nowrap;
        border-collapse: collapse;
@@ -168,12 +172,12 @@ div.tabs {
 }
 div.tabs a {
        border: 1px solid #8cacbb;
-       padding: 0 1em 3px 1em;
+       padding: 3px 10px;
        font-weight: normal;
        background: white scroll repeat 0% 0%;
        color: #436976;
-       margin-right: 0.0em;
-       height: 1.0em;
+       margin-right: 0;
+       height: 10px;
 }
 div.tabs a.selected {
        border-top: 1px solid #8cacbb;