I realize we can integrate webERP with WIKIs but it sure would be nice if we had an area for each Stock and Supplier where we could enter data in a memo area. It would be the same as "Add a note on this customer".
Many of my customers enter bits of data into these areas in their ERP systems.
Well... That was pretty easy...
Can somebody please check my work to be sure it meets webERP standards?
Code:
CREATE TABLE `suppnotes` (
`noteid` tinyint(4) NOT NULL AUTO_INCREMENT,
`supplierid` varchar(10) NOT NULL DEFAULT '0',
`href` varchar(100) NOT NULL,
`note` text NOT NULL,
`date` date NOT NULL DEFAULT '0000-00-00',
`priority` varchar(20) NOT NULL,
PRIMARY KEY (`noteid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Okay... Here is my crack at an abstracted Object Notes script to manage notes for Customers, Suppliers, and Stock...
Code:
CREATE TABLE `objectnotes` (
`noteid` tinyint(4) NOT NULL AUTO_INCREMENT,
`parentid` varchar(10) NOT NULL DEFAULT '0',
`parenttype` varchar(8) NOT NULL,
`href` varchar(100) NOT NULL,
`note` text NOT NULL,
`date` date NOT NULL DEFAULT '0000-00-00',
`priority` varchar(20) NOT NULL,
PRIMARY KEY (`noteid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
I am SURE one of you PHP geniuses can do a lot more to tidy this up and make it a lot better...
Obviously we need to concatenate "&SupplierType=XXX" to the end of the calling hyperlinks...
Now we have just one script to maintain and just one table to maintain.
Not too sure if this goes well with security schema though...
With a script like this we could potentially attach notes to any object in the system.
CREATE TABLE `stocknotes` (
`noteid` tinyint(4) NOT NULL AUTO_INCREMENT,
`stockid` varchar(10) NOT NULL DEFAULT '0',
`href` varchar(100) NOT NULL,
`note` text NOT NULL,
`date` date NOT NULL DEFAULT '0000-00-00',
`priority` varchar(20) NOT NULL,
PRIMARY KEY (`noteid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
PHP Code:
echo '<a href="' . $RootPath . '/AddStockNotes.php?StockID=' . urlencode($StockID) . '">' . _('Add a note on this stock') . '</a><br />';
(02-16-2018, 04:07 AM)VortecCPI Wrote: Okay... Here is my crack at an abstracted Object Notes script to manage notes for Customers, Suppliers, and Stock...
Code:
CREATE TABLE `objectnotes` (
`noteid` tinyint(4) NOT NULL AUTO_INCREMENT,
`parentid` varchar(10) NOT NULL DEFAULT '0',
`parenttype` varchar(8) NOT NULL,
`href` varchar(100) NOT NULL,
`note` text NOT NULL,
`date` date NOT NULL DEFAULT '0000-00-00',
`priority` varchar(20) NOT NULL,
PRIMARY KEY (`noteid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
I am SURE one of you PHP geniuses can do a lot more to tidy this up and make it a lot better...
Obviously we need to concatenate "&SupplierType=XXX" to the end of the calling hyperlinks...
Now we have just one script to maintain and just one table to maintain.
Not too sure if this goes well with security schema though...
With a script like this we could potentially attach notes to any object in the system.
I was inspired by how it is done with TUTOS, which is VERY OO in nature...
We could leave custnotes as is and add this just for Stock and Supplier.
Would be better for upgrades to leave custnotes alone...
It seems to me like we could easily abstract Contacts the same way...
I like the idea of a generic 'object notes' table.
If we go down this route, I'd recommend sticking customer, supplier, and item notes in there, rather than leaving custnotes as is, for the sake of keeping things tidy.
From an upgrade perspective, would it not be better to alter the existing custnotes table to match the 'objectnotes' structure above?
Do you see any benefit in being able to add formatting to a note, with a WYSIWYG HTML editor?