Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stock and Supplier Notes as on Customer
03-13-2018, 11:57 PM, (This post was last modified: 03-14-2018, 12:09 AM by afcouling.)
#5
RE: Supplier Notes as on Customer
(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?

Andy.
https://www.linkedin.com/in/andrewcouling
Reply


Messages In This Thread
RE: Supplier Notes as on Customer - by VortecCPI - 02-16-2018, 01:57 AM
RE: Supplier Notes as on Customer - by VortecCPI - 02-16-2018, 04:07 AM
RE: Supplier Notes as on Customer - by afcouling - 03-13-2018, 11:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)