navigation  interaction  search

 other resources

Changeset 386

Show
Ignore:
Timestamp:
05/06/08 13:36:09
Author:
brieb
Message:
  • Fixed Install and Update Problems
  • Fixed JS problems with sales order entry
  • Removed references to now defunct autofill
  • Reformatted product entry.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/common/javascript/smartsearch.js

    r384 r386  
    342342                 
    343343                smartSearch.inDropDown[ssID] = false; 
    344                 searchDisplay.blur(); 
    345                 searchDisplay.focus(); 
     344                //searchDisplay.blur(); 
     345                //searchDisplay.focus(); 
    346346 
    347347        },//end method 
  • trunk/phpbms/common/stylesheet/mozilla/pages/products.css

    r198 r386  
    22/* $LastChangedDate$ */ 
    33 
    4 #topButtons{float:right;width:160px;} 
    5 #topTitle{margin-right:160px;} 
     4#topButtons{ 
     5        float:right; 
     6        width:160px; 
     7
    68 
    7 #rightsideDiv{clear:both;float:right;width:200px;margin:0;padding:0;} 
    8 #id{width:98%} 
    9 #memo{width:98%;height:255px;
     9#topTitle{ 
     10        margin-right:160px; 
     11
    1012 
    11 #leftsideDiv{margin-right:230px;padding-top:1px;} 
    12 #description{width:99%} 
    13 .costsP{float:left;padding-top:3px;} 
     13#rightsideDiv{ 
     14        clear:both; 
     15        float:right; 
     16        width:220px; 
     17        margin:0; 
     18        padding:0; 
     19
     20 
     21#id, #categoryid, #status, #type, #memo{ 
     22        width:98% 
     23
     24 
     25#leftsideDiv{ 
     26        margin-right:228px; 
     27        padding-top:1px; 
     28
     29 
     30.costsP{ 
     31        float:left; 
     32        padding-top:3px; 
     33
     34 
     35#weightP{ 
     36        clear:left; 
     37
    1438 
    1539#webstuff{display:none} 
  • trunk/phpbms/install/install_include.php

    r285 r386  
    99        $thereturn="Processing SQL from file '".$filename."'\n"; 
    1010                while(!feof($thefile)) { 
    11                         $sqlstatement=trim(fgets($thefile,1024)); 
     11                        $sqlstatement=trim(fgets($thefile,2048)); 
    1212                        if(strrpos($sqlstatement,";")==strlen($sqlstatement)-1){ 
    1313                                $theresult=$db->query($sqlstatement); 
  • trunk/phpbms/install/menu.sql

    r384 r386  
    2626INSERT INTO `menu` (`id`, `name`, `link`, `parentid`, `displayorder`, `createdby`, `modifiedby`, `creationdate`, `modifieddate`, `roleid`) VALUES ('219', 'Help', '', '0', '200', '1', '1', NOW(), NOW(), '0'); 
    2727INSERT INTO `menu` (`id`, `name`, `link`, `parentid`, `displayorder`, `createdby`, `modifiedby`, `creationdate`, `modifieddate`, `roleid`) VALUES ('220', 'About phpBMS', 'javascript:menu.showHelp()', '219', '0', '1', '1', NOW(), NOW(), '0'); 
    28 INSERT INTO `menu` (`name`, `link`, `parentid`, `displayorder`, `createdby`, `modifiedby`, `creationdate`, `modifieddate`, `roleid`) VALUES ('Smart Searches', 'search.php?id=204', '6', '70', 1, 1, NOW(), NOW(), '-100'); 
     28INSERT INTO `menu` (`id`, `name`, `link`, `parentid`, `displayorder`, `createdby`, `modifiedby`, `creationdate`, `modifieddate`, `roleid`) VALUES ('100','Smart Searches', 'search.php?id=204', '6', '70', 1, 1, NOW(), NOW(), '-100'); 
  • trunk/phpbms/modules/bms/include/invoices.php

    r384 r386  
    122122                                        invoicestatuses.invoicedefault, 
    123123                                        invoicestatuses.setreadytopost, 
     124                                        invoicestatuses.defaultassignedtoid, 
    124125                                        users.firstname, 
    125126                                        users.lastname 
     
    147148                                $phpbms->topJS[] = 'statuses['.$therecord["id"].']["name"]="'.htmlQuotes($therecord["name"]).'";'; 
    148149                                $phpbms->topJS[] = 'statuses['.$therecord["id"].']["setreadytopost"]='.$therecord["setreadytopost"].';'; 
     150                                $phpbms->topJS[] = 'statuses['.$therecord["id"].']["userid"]="'.htmlQuotes($therecord["defaultassignedtoid"]).'";'; 
    149151                                $phpbms->topJS[] = 'statuses['.$therecord["id"].']["firstname"]="'.htmlQuotes($therecord["firstname"]).'";'; 
    150152                                $phpbms->topJS[] = 'statuses['.$therecord["id"].']["lastname"]="'.htmlQuotes($therecord["lastname"]).'";';                               
  • trunk/phpbms/modules/bms/install/createtables.sql

    r384 r386  
    5151  KEY `notin` (`inactive`), 
    5252  KEY `thefirstname` (`firstname`), 
    53   KEY `address` (`address1`), 
    54   KEY `zip` (`postalcode`), 
    5553  KEY `created` (`creationdate`), 
    5654  KEY `thelastname` (`lastname`), 
     
    7977  `statusid` int(10) unsigned default NULL, 
    8078  `statusdate` date default NULL, 
     79  `readytopost` tinyint(3) unsigned NOT NULL default '0', 
    8180  `assignedtoid` int(10) unsigned default NULL, 
    82   `readytopost` TINYINT UNSIGNED NOT NULL DEFAULT 0,   
    8381  `ponumber` varchar(64) default NULL, 
    8482  `orderdate` date default NULL, 
     
    8987  `address2` varchar(128) default NULL, 
    9088  `city` varchar(64) default NULL, 
    91   `state` varchar(20) default NULL, 
     89  `state` varchar(5) default NULL, 
    9290  `postalcode` varchar(15) default NULL, 
    9391  `country` varchar(64) default '', 
     
    122120  `creationdate` datetime NOT NULL default '0000-00-00 00:00:00', 
    123121  `modifiedby` int(11) default NULL, 
    124   `modifieddate` timestamp, 
     122  `modifieddate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, 
     123  `shiptoname` varchar(128) default NULL, 
     124  `shiptoaddress1` varchar(128) default NULL, 
     125  `shiptoaddress2` varchar(128) default NULL, 
     126  `shiptocity` varchar(64) default NULL, 
     127  `shiptostate` varchar(20) default NULL, 
     128  `shiptopostalcode` varchar(15) default NULL, 
     129  `shiptocountry` varchar(64) default NULL, 
     130  `billingaddressid` int(11) default NULL, 
     131  `shiptoaddressid` int(11) default NULL, 
     132  `shiptosameasbilling` tinyint(3) unsigned NOT NULL default '0', 
    125133  UNIQUE KEY `theid` (`id`), 
    126134  KEY `client` (`clientid`) 
  • trunk/phpbms/modules/bms/install/tablecolumns.sql

    r385 r386  
    11INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'e-mail', 'clients.email', 'left', '', '3', '', '0', '', NULL, '0'); 
    22INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'has credit', 'clients.hascredit', 'center', '', '1', '', '0', '', 'boolean', '80'); 
    3 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'name / location', 'CONCAT(\'[b]\',IF(clients.company != \'\', CONCAT(clients.company,IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(\' (\',if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\'),\')\'), \'\')), IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\')), \'\')),\'[/b][br][space]\', IF(addresses.city != \'\' OR addresses.state !=\'\' OR addresses.postalcode != \'\', CONCAT(IF(addresses.city != \'\',addresses.city,\'\'),\', \',IF(addresses.state != \'\', addresses.state, \'\'),\' \',IF(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'(no location)\'))', 'left', '', '2', 'concat(clients.company,clients.lastname,clients.firstname)', '0', '100%', 'bbcode', '0'); 
     3INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'name / location', 'CONCAT(\'[b]\',IF(clients.company != \'\', CONCAT(clients.company,IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(\' (\',if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\'),\')\'), \'\')), IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\')), \'\')),\'[/b][br][space]\', IF(addresses.city != \'\' OR addresses.state !=\'\' OR addresses.postalcode != \'\', CONCAT(IF(addresses.city != \'\',addresses.city,\'\'),\', \',IF(addresses.state != \'\', addresses.state, \'\'),\' \',IF(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'(no location)\'))', 'left', '', '2', 'concat(clients.company,cliennts.lastname,clients.firstname)', '0', '100%', 'bbcode', '0'); 
    44INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'type', 'clients.type', 'left', '', '0', '', '0', '', NULL, '0'); 
    55INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'phone', 'IF(clients.workphone != \'\' OR clients.homephone != \'\' OR clients.mobilephone != \'\' OR clients.otherphone != \'\',IF(clients.workphone != \'\', concat(clients.workphone, \' (w)\'), IF(clients.homephone != \'\', concat(clients.homephone, \' (h)\'), IF(clients.mobilephone != \'\', concat(clients.mobilephone, \' (m)\'), IF(clients.otherphone != \'\', concat(clients.otherphone, \' (o)\'), \'\')))) ,\'\')', 'left', '', '4', 'concat(clients.workphone, clients.homephone, clients.mobilephone,clients.otherphone)', '0', '', NULL, '0'); 
     
    7272INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES (304,'date','receipts.receiptdate','left','',3,'',0,'','date',0); 
    7373INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES (304,'status','receipts.status','left','',2,'',0,'',NULL,0); 
    74 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'address', 'concat(if(addresses.title != \'\',concat(\'[b]\',addresses.title,\'[/b][br]\'),\'\'),addresses.address1,if(addresses.address2 != \'\',concat(\'[br]\', addresses.address2),\'\'),if(addresses.city != \'\',concat(\'[br]\',addresses.city,\', \',if(addresses.state != \'\',addresses.state, \'\'),\' \',if(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'\'),if(addresses.country != \'\',concat(\'[br]\',addresses.country),\'\'))', 'left', '', '0', '', '1', '100%', 'bbcode', '0'); 
     74INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'address', 'concat(if(addresses.title != \'\',concat(\'[b]\',addresses.title,\'[/b][br]\'),\'\'),IF(addresses.address1!=\'\',addresses.address1,\'\'),if(addresses.address2 != \'\',concat(\'[br]\', addresses.address2),\'\'),if(addresses.city != \'\',concat(\'[br]\',addresses.city,\', \',if(addresses.state != \'\',addresses.state, \'\'),\' \',if(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'\'),if(addresses.country != \'\',concat(\'[br]\',addresses.country),\'\'))', 'left', '', '0', '', '1', '100%', 'bbcode', '0'); 
    7575INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'default ship to', 'addresstorecord.defaultshipto', 'center', '', '4', '', '0', '', 'boolean', '0'); 
    7676INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'ship to name', 'addresses.shiptoname', 'left', '', '3', '', '0', '', NULL, '0'); 
  • trunk/phpbms/modules/bms/install/tabledefs.sql

    r385 r386  
    66INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (7,'Product Categories','table',2,'productcategories','productcategories','modules/bms/productcategories_addedit.php',0,'modules/bms/productcategories_addedit.php',0,0,-100,-100,'delete','productcategories.id !=0','productcategories.name','','','',1,NOW(),1,NOW()); 
    77INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (8,'Prerequisites','table',2,'prerequisites','(prerequisites left join products on prerequisites.parentid=products.id) left join products as childproducts on prerequisites.childid=childproducts.id','N/A',0,'N/A',0,0,-100,-100,'NA','prerequisites.id =-1','products.id','','','',1,NOW(),1,NOW()); 
    8 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (18,'Client Duplicates','view',2,'clients','(clients, clients dupclients)','N/A',0,'N/A',0,0,-100,-100,'NA','clients.id = -100','concat(clients.lastname,\", \",clients.firstname)','','','',1,NOW(),1,NOW()); 
     8INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('18', 'Client Duplicates', 'view', '2', 'clients', '((clients INNER JOIN addresstorecord on clients.id = addresstorecord.recordid AND addresstorecord.tabledefid=2 AND addresstorecord.primary=1) INNER JOIN addresses ON addresstorecord.addressid = addresses.id),((clients AS dclients INNER JOIN addresstorecord as daddresstorecord on dclients.id = daddresstorecord.recordid AND daddresstorecord.tabledefid=2 AND daddresstorecord.primary=1) INNER JOIN addresses AS daddresses ON daddresstorecord.addressid = daddresses.id)', 'N/A', '0', 'N/A', '0', '0', '-100', '-100', 'NA', 'clients.id = -100', 'clients.company, clients.lastname, clients.firstname', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
    99INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (25,'Discounts','table',2,'discounts','discounts','modules/bms/discounts_addedit.php',0,'modules/bms/discounts_addedit.php',0,0,-100,-100,'inactivate','discounts.id!=0','discounts.id','search','all records','name',1,NOW(),1,NOW()); 
    1010INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (300,'Shipping Methods','table',2,'shippingmethods','shippingmethods','modules/bms/shippingmethods_addedit.php',30,'modules/bms/shippingmethods_addedit.php',30,30,30,-100,'inactivate','shippingmethods.inactive!=0','shippingmethods.priority, shippingmethods.name','','','',1,NOW(),1,NOW()); 
     
    1515INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('305', 'Client Addresses', 'view', '2', 'addresstorecord', '((addresstorecord INNER JOIN addresses ON addresstorecord.addressid = addresses.id) INNER JOIN clients ON addresstorecord.recordid = clients.id)', 'modules/bms/addresses_addedit.php', '0', 'modules/bms/addresses_addedit.php', '0', '0', '-100', '-100', 'remove', 'addresstorecord.tabledefid=2 AND addresstorecord.id = -100', 'addresstorecord.primary DESC,  addresstorecord.defaultshipto DESC,  addresses.title,  addresses.address1', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
    1616INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('306', 'Addresses', 'table', '2', 'addresses', 'addresses', 'modules/bms/addresses_addedit.php', '0', 'modules/bms/addresses_addedit.php', '0', '0', '-100', '-100', 'delete', 'addresses.id != -100', 'address.title', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
    17 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('18', 'Client Duplicates', 'view', '2', 'clients', '((clients INNER JOIN addresstorecord on clients.id = addresstorecord.recordid AND addresstorecord.tabledefid=2 AND addresstorecord.primary=1) INNER JOIN addresses ON addresstorecord.addressid = addresses.id),((clients AS dclients INNER JOIN addresstorecord as daddresstorecord on dclients.id = daddresstorecord.recordid AND daddresstorecord.tabledefid=2 AND daddresstorecord.primary=1) INNER JOIN addresses AS daddresses ON daddresstorecord.addressid = daddresses.id)', 'N/A', '0', 'N/A', '0', '0', '-100', '-100', 'NA', 'clients.id = -100', 'clients.company, clients.lastname, clients.firstname', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
  • trunk/phpbms/modules/bms/install/update.php

    r384 r386  
    468468                $queryresult = $db->query($querystatement); 
    469469                 
    470                 while($therecord = $db->fetchArray($querystatement)){ 
     470                while($therecord = $db->fetchArray($queryresult)){ 
    471471                 
    472472                        $updatestatement = " 
     
    485485                                        state =         '".$therecord["state"]."', 
    486486                                        postalcode ='".$therecord["postalcode"]."', 
    487                                         country =       '".$therecord["country"]."', 
     487                                        country =       '".$therecord["country"]."' 
    488488                                WHERE 
    489489                                        id = ".$therecord["id"]; 
     490 
     491                                $db->query($updatestatement); 
    490492                 
    491493                }//endwhile - record 
     494         
     495                return true; 
    492496         
    493497        }//end function - v096updateInvoiceAddresses 
     
    598602                                addressid, 
    599603                                `primary`, 
     604                                defaultshipto, 
    600605                                createdby, 
    601606                                creationdate, 
     
    608613                                ".$variables["primary"].", 
    609614                                ".$variables["defaultshipto"].", 
     615                                1, 
    610616                                NOW(), 
    611617                                1, 
     
    636642                                        modifieddate 
    637643                                ) VALUES ( 
    638                                         '"variables["title"]"', 
     644                                        '".$variables["title"]."', 
    639645                                        '".$variables["address1"]."', 
    640646                                        '".$variables["address2"]."', 
  • trunk/phpbms/modules/bms/install/updatev0.96.sql

    r385 r386  
    1818INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'e-mail', 'clients.email', 'left', '', '3', '', '0', '', NULL, '0'); 
    1919INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'has credit', 'clients.hascredit', 'center', '', '1', '', '0', '', 'boolean', '80'); 
    20 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'name / location', 'CONCAT(\'[b]\',IF(clients.company != \'\', CONCAT(clients.company,IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(\' (\',if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\'),\')\'), \'\')), IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\')), \'\')),\'[/b][br][space]\', IF(addresses.city != \'\' OR addresses.state !=\'\' OR addresses.postalcode != \'\', CONCAT(IF(addresses.city != \'\',addresses.city,\'\'),\', \',IF(addresses.state != \'\', addresses.state, \'\'),\' \',IF(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'(no location)\'))', 'left', '', '2', 'concat(clients.company,clients.lastname,clients.firstname)', '0', '100%', 'bbcode', '0'); 
     20INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'name / location', 'CONCAT(\'[b]\',IF(clients.company != \'\', CONCAT(clients.company,IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(\' (\',if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\'),\')\'), \'\')), IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\')), \'\')),\'[/b][br][space]\', IF(addresses.city != \'\' OR addresses.state !=\'\' OR addresses.postalcode != \'\', CONCAT(IF(addresses.city != \'\',addresses.city,\'\'),\', \',IF(addresses.state != \'\', addresses.state, \'\'),\' \',IF(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'(no location)\'))', 'left', '', '2', 'concat(clients.company,cliennts.lastname,clients.firstname)', '0', '100%', 'bbcode', '0'); 
    2121INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'type', 'clients.type', 'left', '', '0', '', '0', '', NULL, '0'); 
    2222INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('2', 'phone', 'IF(clients.workphone != \'\' OR clients.homephone != \'\' OR clients.mobilephone != \'\' OR clients.otherphone != \'\',IF(clients.workphone != \'\', concat(clients.workphone, \' (w)\'), IF(clients.homephone != \'\', concat(clients.homephone, \' (h)\'), IF(clients.mobilephone != \'\', concat(clients.mobilephone, \' (m)\'), IF(clients.otherphone != \'\', concat(clients.otherphone, \' (o)\'), \'\')))) ,\'\')', 'left', '', '4', 'concat(clients.workphone, clients.homephone, clients.mobilephone,clients.otherphone)', '0', '', NULL, '0'); 
     
    2424INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('18', 'type', 'clients.type', 'left', '', '1', '', '0', '', NULL, '0'); 
    2525INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('18', 'name', 'IF(clients.company != \'\', CONCAT(clients.company,IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(\' (\',if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\'),\')\'), \'\')), IF(clients.lastname != \'\' OR clients.firstname != \'\', CONCAT(if(clients.lastname != \'\', clients.lastname, \'{blank}\'),\', \',if(clients.firstname != \'\', clients.firstname, \'{blank}\')), \'\'))', 'left', '', '2', 'concat(clients.company,clients.lastname,clients.firstname)', '1', '100%', NULL, '0'); 
    26 INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'address', 'concat(if(addresses.title != \'\',concat(\'[b]\',addresses.title,\'[/b][br]\'),\'\'),addresses.address1,if(addresses.address2 != \'\',concat(\'[br]\', addresses.address2),\'\'),if(addresses.city != \'\',concat(\'[br]\',addresses.city,\', \',if(addresses.state != \'\',addresses.state, \'\'),\' \',if(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'\'),if(addresses.country != \'\',concat(\'[br]\',addresses.country),\'\'))', 'left', '', '0', '', '1', '100%', 'bbcode', '0'); 
     26INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'address', 'concat(if(addresses.title != \'\',concat(\'[b]\',addresses.title,\'[/b][br]\'),\'\'),IF(addresses.address1!=\'\',addresses.address1,\'\'),if(addresses.address2 != \'\',concat(\'[br]\', addresses.address2),\'\'),if(addresses.city != \'\',concat(\'[br]\',addresses.city,\', \',if(addresses.state != \'\',addresses.state, \'\'),\' \',if(addresses.postalcode != \'\', addresses.postalcode, \'\')),\'\'),if(addresses.country != \'\',concat(\'[br]\',addresses.country),\'\'))', 'left', '', '0', '', '1', '100%', 'bbcode', '0'); 
    2727INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'default ship to', 'addresstorecord.defaultshipto', 'center', '', '4', '', '0', '', 'boolean', '0'); 
    2828INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('305', 'ship to name', 'addresses.shiptoname', 'left', '', '3', '', '0', '', NULL, '0'); 
  • trunk/phpbms/modules/bms/javascript/invoice.js

    r384 r386  
    210210        statusChosen: function(e){ 
    211211                 
    212                 var status=getObjectFromID("statusid"); 
    213                 var assignedto=getObjectFromID("ds-assignedtoid"); 
     212                var status = getObjectFromID("statusid"); 
     213                var assignedto = getObjectFromID("ds-assignedtoid"); 
     214                var assignedtoid = getObjectFromID("assignedtoid"); 
    214215 
    215216                //update assignedto 
     
    217218                         
    218219                        assignedto.value = (statuses[status.value]["firstname"]+" "+statuses[status.value]["lastname"]).replace(/^\s+|\s+$/g,""); 
    219                         lastLookup(assignedto); 
     220                        assignedtoid.value = statuses[status.value]["userid"] 
    220221                         
    221222                }//endif 
  • trunk/phpbms/modules/bms/javascript/invoiceaddress.js

    r384 r386  
    139139                theButton = e.src(); 
    140140                 
    141                 addresses.loadSection = theButton.id.substr(17); 
    142                  
    143                 var clientid = getObjectFromID("clientid"); 
    144                  
    145                 var theurl = "invoices_addresses_ajax.php?w=l&id="+clientid.value; 
    146                  
    147                 loadXMLDoc(theurl,null,false);           
    148                  
    149                 var content = req.responseText; 
    150                  
    151                 showModal(content, "Load Client Address", 400); 
    152                  
    153                 var cancelButton = getObjectFromID("LACancelButton") 
    154                 addresses.loadConnects[0] = connect(cancelButton, "onclick", addresses.closeLoad); 
    155                  
    156                 var loadButton = getObjectFromID("LALoadButton") 
    157                 addresses.loadConnects[1] = connect(loadButton, "onclick", addresses.loadAddress); 
    158  
    159                 var atags = getElementsByClassName("LAPickAs"); 
    160                 for(var i=0; i<atags.length;i++) 
    161                         addresses.loadConnects[addresses.loadConnects.length] = connect(atags[i], "onclick", addresses.pickAddress); 
    162                  
     141                if(theButton.className.indexOf("disabled") === -1){ 
     142 
     143                        addresses.loadSection = theButton.id.substr(17); 
     144                         
     145                        var clientid = getObjectFromID("clientid"); 
     146                         
     147                        var theurl = "invoices_addresses_ajax.php?w=l&id="+clientid.value; 
     148                         
     149                        loadXMLDoc(theurl,null,false);           
     150                         
     151                        var content = req.responseText; 
     152                         
     153                        showModal(content, "Load Client Address", 400); 
     154                         
     155                        var cancelButton = getObjectFromID("LACancelButton") 
     156                        addresses.loadConnects[0] = connect(cancelButton, "onclick", addresses.closeLoad); 
     157                         
     158                        var loadButton = getObjectFromID("LALoadButton") 
     159                        addresses.loadConnects[1] = connect(loadButton, "onclick", addresses.loadAddress); 
     160         
     161                        var atags = getElementsByClassName("LAPickAs"); 
     162                        for(var i=0; i<atags.length;i++) 
     163                                addresses.loadConnects[addresses.loadConnects.length] = connect(atags[i], "onclick", addresses.pickAddress); 
     164                                 
     165                }//endif - disabled 
    163166                 
    164167        },//end method - showLoad 
  • trunk/phpbms/modules/bms/products_addedit.php

    r285 r386  
    6666                $theinput = new inputCheckbox("taxable",$therecord["taxable"]); 
    6767                $theform->addField($theinput); 
    68                  
    69                 $theinput = new inputField("partnumber",$therecord["partnumber"],"part number",true,NULL,20,32,false); 
     68 
     69                $temparray = array("Inventory"=>"Inventory","Non-Inventory"=>"Non-Inventory","Service"=>"Service","Kit"=>"Kit","Assembly"=>"Assembly"); 
     70                $theinput = new inputBasicList("type",$therecord["type"],$temparray); 
     71                $theform->addField($theinput); 
     72                 
     73                $temparray = array("In Stock (Available)"=>"In Stock","Out of Stock (Unavailable)"=>"Out of Stock","Back Ordered"=>"Backordered"); 
     74                $theinput = new inputBasicList("status",$therecord["status"],$temparray,"availablity"); 
     75                $theform->addField($theinput); 
     76 
     77                $theinput = new inputField("partname",$therecord["partname"],"name"); 
     78                $theinput->setAttribute("class","important"); 
     79                $theform->addField($theinput); 
     80 
     81                $theinput = new inputField("partnumber",$therecord["partnumber"],"part number",true); 
    7082                $theinput->setAttribute("onchange","checkPartNumber()"); 
    7183                $theinput->setAttribute("class","important"); 
    7284                $theform->addField($theinput); 
    7385                 
     86                $theinput = new inputField("upc",$therecord["upc"],"UPC"); 
     87                $theform->addField($theinput); 
     88 
     89                $theinput = new inputField("description",$therecord["description"],"description",false,NULL,64,255); 
     90                $theform->addField($theinput); 
     91 
    7492                $theinput = new inputCurrency("unitprice", $therecord["unitprice"], "sell price" ,true); 
    7593                $theinput->setAttribute("class","important"); 
     
    8199                $theform->addField($theinput); 
    82100                 
    83  
    84101                $markup=0; 
    85                 if($therecord["unitcost"]!=0){ 
     102                if($therecord["unitcost"]!=0) 
    86103                        $markup=round(($therecord["unitprice"]/$therecord["unitcost"])-1,4)*100; 
    87                 }                                
     104 
    88105                $theinput = new inputPercentage("markup", $markup, "mark-up",2); 
    89106                $theinput->setAttribute("size","10"); 
    90107                $theform->addField($theinput); 
    91  
    92                 $theinput = new inputField("weight",$therecord["weight"],NULL,false,"real",10,16,false); 
     108                 
     109                $theinput = new inputField("unitofmeasure",$therecord["unitofmeasure"],"unit of measure"); 
     110                $theform->addField($theinput); 
     111 
     112                $theinput = new inputField("weight",$therecord["weight"],NULL,false,"real"); 
    93113                $theform->addField($theinput); 
    94114 
     
    135155 
    136156                        <p> 
    137                                 <?php $theform->showField("taxable")?> 
    138                         </p> 
    139  
    140                         <p> 
    141                                 <span class="important">product type</span><br /> 
    142                                 <input type="radio" name="type" id="typeInventory" value="Inventory" <?php if($therecord["type"]=="Inventory") echo "checked=\"checked\""?> class="radiochecks" tabindex="70"/><label for="typeInventory">inventory</label><br /> 
    143                                 <input type="radio" name="type" id="typeNonInventory" value="Non-Inventory" <?php if($therecord["type"]=="Non-Inventory") echo "checked=\"checked\""?> class="radiochecks" tabindex="80"/><label for="typeNonInventory" >non-inventory</label><br /> 
    144                                 <input type="radio" name="type" id="typeService" value="Service" <?php if($therecord["type"]=="Service") echo "checked=\"checked\""?> class="radiochecks"  tabindex="90"/><label for="typeService" >service</label><br /> 
    145                                 <input type="radio" name="type" id="typeKit" value="Kit" <?php if($therecord["type"]=="Kit") echo "checked=\"checked\""?> class="radiochecks"  tabindex="100"/><label for="typeKit" >kit</label><br /> 
    146                                 <input type="radio" name="type" id="typeAssembly" value="Assembly" <?php if($therecord["type"]=="Assembly") echo "checked=\"checked\""?> class="radiochecks"  tabindex="110"/><label for="typeAssembly">assembly</label> 
    147                         </p> 
    148                          
    149                         <p> 
    150                                 <span class="important">available status</span><br /> 
    151                                 <input type="radio" name="status" id="statusInStock" value="In Stock" <?php if($therecord["status"]=="In Stock") echo "checked=\"checked\""?> class="radiochecks"  tabindex="120"/> <label for="statusInStock">in stock / available</label><br /> 
    152                                 <input type="radio" name="status" id="statusOutOfStock" value="Out of Stock" <?php if($therecord["status"]=="Out of Stock") echo "checked=\"checked\""?> class="radiochecks"  tabindex="130"/><label for="statusOutOfStock">out of stock / unavailable</label><br /> 
    153                                 <input type="radio" name="status" id="statusBackordered" value="Backordered" <?php if($therecord["status"]=="Backordered") echo "checked=\"checked\""?> class="radiochecks"  tabindex="140"/><label for="statusBackordered">backordered</label> 
    154                         </p> 
     157                                <label for="categoryid">category</label><br /> 
     158                                <?php $thetable->displayProductCategories($therecord["categoryid"]) ?> 
     159                        </p> 
     160 
     161                        <p><?php $theform->showField("type")?></p> 
     162                         
     163                        <p><?php $theform->showField("status")?></p> 
     164 
    155165                </fieldset> 
    156166                 
     
    158168                        <legend><label for="memo">memo</label></legend> 
    159169                        <p> 
    160                                 <textarea cols="10" rows="11" name="memo" id="memo" tabindex="300"><?php echo $therecord["memo"]?></textarea> 
     170                                <textarea cols="10" rows="11" name="memo" id="memo" ><?php echo $therecord["memo"]?></textarea> 
    161171                        </p> 
    162172                </fieldset> 
     
    165175        <div id="leftsideDiv"> 
    166176                <fieldset> 
    167                         <legend>product</legend> 
    168                          
    169                         <p> 
    170                                 <label for="partname" class="important">name</label><br /> 
    171                                 <input name="partname" type="text" class="important" id="partname" value="<?php echo htmlQuotes($therecord["partname"])?>" size="42" maxlength="128" tabindex="10" />                                                    
    172                         </p> 
    173                          
    174                         <p> 
    175                                 <label for="partnumber"><span class="important">part number</span> <span class="notes">(must be unique)</span></label><br /> 
    176                                 <?php $theform->showField("partnumber") ?> 
    177                         </p> 
    178                          
    179                         <div class="fauxP"> 
    180                                 <label for="categoryid" class="important">product category</label><br /> 
    181                                 <?php $thetable->displayProductCategories($therecord["categoryid"]) ?> 
    182                         </div> 
    183                          
    184                         <p> 
    185                                 <label for="upc">UPC</label><br /> 
    186                                 <input name="upc" type="text" id="upc" value="<?php echo htmlQuotes($therecord["upc"])?>" size="40" maxlength="128" tabindex="40" /> 
    187                         </p> 
    188                          
    189                         <p> 
    190                                 <label for="description" style="">description</label><br /> 
    191                                 <input name="description" type="text" id="description" value="<?php echo htmlQuotes($therecord["description"])?>" size="34" maxlength="255" tabindex="40" />                     
    192                                 <span class="notes"> 
    193                                         <strong>Note:</strong> The description will show by default in the memo field of invoice 
    194                                         line items, but can be modified on the invoice. 
    195                                 </span> 
    196                         </p> 
    197                          
    198                 </fieldset> 
    199                  
    200                 <fieldset> 
    201                         <legend>price / cost</legend> 
    202                         <p> 
    203                                 <?php $theform->showField("unitprice")?> 
    204                         </p> 
    205  
    206                         <p class="costsP"> 
    207                                 <?php $theform->showField("unitcost")?> 
    208                         </p>                     
    209                         <p class="costsP"> 
    210                                 <?php $theform->showField("markup")?> 
    211                         </p> 
     177                        <legend>identification</legend> 
     178                         
     179                        <p><?php $theform->showField("partname")?></p> 
     180                         
     181                        <p><?php $theform->showField("partnumber") ?></p> 
     182                         
     183                        <p><?php $theform->showField("upc") ?></p> 
     184 
     185                        <p><?php $theform->showField("description") ?></p> 
     186                                                 
     187                </fieldset> 
     188                 
     189                <fieldset> 
     190                        <legend>cost and weight</legend> 
     191 
     192                        <p><?php $theform->showField("taxable")?></p> 
     193 
     194                        <p><?php $theform->showField("unitprice")?></p> 
     195 
     196                        <p class="costsP"><?php $theform->showField("unitcost")?></p>                    
     197 
     198                        <p class="costsP"><?php $theform->showField("markup")?></p> 
     199 
    212200                        <p> 
    213201                                <br /> 
    214                                 <input type="button" name="updateprice" value="update price" class="Buttons" onclick="calculatePrice()" tabindex="160" /> 
    215                         </p> 
    216  
    217                         <p style="clear:both;"> 
    218                                 <label for="unitofmeasure">units of measure</label><br /> 
    219                                 <input name="unitofmeasure" type="text" id="unitofmeasure" value="<?php echo htmlQuotes($therecord["unitofmeasure"])?>" size="40" maxlength="32" tabindex="190"/> 
    220                         </p>                                                                                     
    221  
    222                 </fieldset> 
    223                  
    224                 <fieldset> 
    225                         <legend>weight / shipping</legend> 
    226                         <p> 
    227                                 <label for="weight">weight</label> (lbs.)<br /> 
    228                                 <?php  $theform->showfield("weight")?><br /> 
    229                                 <span class="notes"><strong>Note:</strong> Weight must be in lbs. in order for shipping to be auto-estimated correctly.</span> 
    230                         </p> 
    231                          
     202                                <input type="button" name="updateprice" value="update price" class="Buttons" onclick="calculatePrice()"/> 
     203                        </p> 
     204 
     205                        <p id="weightP"><?php $theform->showField("weight")?></p> 
     206                        <p><?php $theform->showField("unitofmeasure")?></p> 
     207 
     208                </fieldset> 
     209                 
     210                <fieldset> 
     211                        <legend>shipping</legend>                        
    232212                        <p> 
    233213                                <label for="packagesperitem">items per package <span class="notes">(number of product items that can fit in a shipping package)</span></label><br /> 
     
    242222                        </p> 
    243223                </fieldset> 
     224                 
     225                <fieldset> 
     226                        <legend>web</legend> 
     227                        <p> 
     228                                <?php $theform->showfield("webenabled");?> 
     229                        </p> 
     230                                         
     231                        <div style=" <?php if(!$therecord["webenabled"]) echo "display:none;" ?>" id="webstuff"> 
     232                                <p> 
     233                                        <label for="keywords">keywords <span class="notes">(comma separated key word list)</span></label><br /> 
     234                                        <input type="text" id="keywords" name="keywords" value="<?php echo htmlQuotes($therecord["keywords"])?>" size="40" maxlength="255"/> 
     235                                </p> 
     236                                <div class="fauxP"> 
     237                                        <label for="webdescription">web description <span class="notes">(HTML acceptable)</span></label><br /> 
     238                                         
     239                                        <div style=" <?php if($therecord["webdescription"]) echo "display:none;"?>" id="webDescEdit"> 
     240                                                <textarea id="webdescription" name="webdescription" cols="60" rows="6"><?php echo $therecord["webdescription"] ?></textarea> 
     241                                        </div> 
     242                                        <div style=" <?php if(!$therecord["webdescription"]) echo "display:none;"?>" id="webDescPreview"> 
     243                                        <?php echo $therecord["webdescription"] ?> 
     244                                        </div>                   
     245                                        <div><input id="buttonWebPreview" type="button" class="Buttons" onclick="editPreviewWebDesc(this)" value="<?php if(!$therecord["webdescription"]) echo "preview"; else echo "edit"?>"/></div> 
     246         
     247                                </div> 
     248                                 
     249                                <div class="fauxP"> 
     250                                        thumbnail graphic<br /> 
     251                                        <?php if($therecord["thumbnailmime"]) {?> 
     252                                                <img id="thumbpic" src="<?php echo APP_PATH ?>dbgraphic.php?t=products&f=thumbnail&mf=thumbnailmime&r=<?php echo $therecord["id"]?>" style="border: 1px solid black; display: block; margin: 3px;;" /> 
     253                                        <?php } else {?> 
     254                                                <div id="noThumb" class="tiny" align="center">no thumbnail</div> 
     255                                        <?php } ?> 
     256                                        upload thumbnail<br /> 
     257                                        <input type="hidden" id="thumbchange" name="thumbchange" value="" /> 
     258                                        <div id="thumbdelete" style="display:<?php if($therecord["thumbnailmime"]) echo "block"; else echo "none";?>"><input type="button" class="Buttons" value="delete thumbnail" onclick="deletePicture('thumb')" tabindex="260"/></div> 
     259                                        <div id="thumbadd" style="display:<?php if($therecord["thumbnailmime"]) echo "none"; else echo "block";?>"><input id="thumbnailupload" name="thumbnailupload" type="file" size="40" onchange="updatePictureStatus('thumb','upload')" tabindex="260" /></div> 
     260                                </div> 
     261         
     262                                <div class="fauxP"> 
     263                                        main picture<br /> 
     264                                        <?php if($therecord["picturemime"]) {?> 
     265                                                <img id="picturepic" src="<?php echo APP_PATH ?>dbgraphic.php?t=products&f=picture&mf=picturemime&r=<?php echo $therecord["id"]?>" style="border: 1px solid black; display: block; margin: 3px;;" /> 
     266                                        <?php } else {?> 
     267                                                <div id="noPicture" class="tiny" align="center">no picture</div> 
     268                                        <?php } ?> 
     269                                        upload picture <br /> 
     270                                        <input type="hidden" id="picturechange" name="picturechange" value="" /> 
     271                                        <div id="picturedelete" style="display:<?php if($therecord["picturemime"]) echo "block"; else echo "none";?>"><input type="button" class="Buttons" value="delete picture" onclick="deletePicture('picture')" tabindex="270"/></div>                              
     272                                        <div id="pictureadd" style="display:<?php if($therecord["picturemime"]) echo "none"; else echo "block";?>"&