Post Reply 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stock and Supplier Notes as on Customer
02-16-2018, 12:51 AM (This post was last modified: 02-16-2018 08:06 AM by VortecCPI.)
Post: #1
Stock and Supplier Notes as on Customer
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?

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`)

Of course we also need to:

Add area to bottom of Supplier page:

PHP Code:
        // Supplier Notes
                FROM suppnotes
                WHERE supplierid='" 
$_SESSION['SupplierID'] . "'
                ORDER BY date DESC"
$result DB_query($SQL);
DB_num_rows($result) <> 0) {
'<br /><div class="centre"><img src="' $RootPath '/css/' $Theme '/images/note_add.png" title="' _('Supplier Notes') . '" alt="" />' ' ' _('Supplier Notes') . '</div><br />';
'<table style="width: 45%;">';
                    <th class="ascending">' 
_('Date') . '</th>
_('Note') . '</th>
_('Hyperlink') . '</th>
                    <th class="ascending">' 
_('Priority') . '</th>
_('Edit') . '</th>
_('Delete') . '</th>
                    <th> <a href="AddSupplierNotes.php?SupplierID='
urlencode($_SESSION['SupplierID']), '">' ' ' _('Add New Note') . '</a> </th>
$k 0;// row colour counter
while ($myrow DB_fetch_array($result)) {
$k == 1) {
'<tr class="OddTableRows">';
$k 0;
// $k == 1
else {
'<tr class="EvenTableRows">';
$k 1;
'<td>' ConvertSQLDate($myrow['date']) . '</td>
$myrow['note'] . '</td>
                    <td><a href="' 
$myrow['href'] . '">' $myrow['href'] . '</a></td>
$myrow['priority'] . '</td>
                    <td><a href="AddSupplierNotes.php?Id=' 
$myrow['noteid'] . '&amp;SupplierID=' $myrow['supplierid'] . '">' _('Edit') . '</a></td>
                    <td><a href="AddSupplierNotes.php?Id=' 
$myrow['noteid'] . '&amp;SupplierID=' $myrow['supplierid'] . '&amp;delete=1">' _('Delete') . '</a></td>
echo '</table>';
// end if there are supplier notes to display 

Add entry to scripts table
Add line of code in SelectSupplier.php

PHP Code:
<br /><a href="' . $RootPath . '/AddSupplierNotes.php?SupplierID=' . $_SESSION['SupplierID'] . '">' . _('Add a note on this supplier') . '</a

Add applicable entries to

_('Supplier Notes')
_('Notes for Supplier')
_('Are you sure you wish to delete this supplier note?')
_('Review all notes for this Supplier')

Attached File(s)
.php  AddSupplierNotes.php (Size: 7.56 KB / Downloads: 0)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Stock and Supplier Notes as on Customer - VortecCPI - 02-16-2018 12:51 AM

Forum Jump:

User(s) browsing this thread: 1 Guest(s)