From: <tim...@us...> - 2009-11-19 11:49:57
|
Revision: 3051 http://web-erp.svn.sourceforge.net/web-erp/?rev=3051&view=rev Author: tim_schofield Date: 2009-11-19 11:49:22 +0000 (Thu, 19 Nov 2009) Log Message: ----------- Improvements to factor company implementaton. Modified Paths: -------------- trunk/Factors.php trunk/Suppliers.php trunk/doc/Change.log.html trunk/sql/mysql/upgrade3.11-3.12.sql Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2009-11-19 06:17:13 UTC (rev 3050) +++ trunk/Factors.php 2009-11-19 11:49:22 UTC (rev 3051) @@ -1,44 +1,34 @@ <?php - $PageSecurity = 5; - -include('includes/session.inc'); - +include ('includes/session.inc'); $title = _('Factor Company Maintenance'); - -include('includes/header.inc'); - -if (isset($_GET['FactorID'])){ - $FactorID = strtoupper($_GET['FactorID']); -} elseif (isset($_POST['FactorID'])){ - $FactorID = strtoupper($_POST['FactorID']); +include ('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . '" alt="">' . ' ' . _('Factor Company Maintenance') . ''; +if (isset($_GET['FactorID'])) { + $FactorID = strtoupper($_GET['FactorID']); +} elseif (isset($_POST['FactorID'])) { + $FactorID = strtoupper($_POST['FactorID']); } else { - unset($FactorID); + unset($FactorID); } - if (isset($_POST['Create'])) { - $FactorID = 0; - $_POST['New'] = "Yes"; + $FactorID = 0; + $_POST['New'] = "Yes"; }; - if (isset($_POST['submit'])) { - - /* This section has been reached because the user has pressed either the insert/update buttons on the - form hopefully with input in the correct fields, which we check for firsrt. */ - - //initialise no input errors assumed initially before we test - $InputError = 0; - - if (strlen($_POST['FactorName']) > 40 or strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { - $InputError = 1; - prnMsg(_('The factoring company name must be entered and be forty characters or less long'),'error'); - } - - /* If no input errors have been recieved */ - if ($InputError != 1){ - //And if its not a new part then update existing one - if (!isset($_POST['New'])) { - $sql = "UPDATE factorcompanies SET coyname='" . $_POST['FactorName'] . "', + /* This section has been reached because the user has pressed either the insert/update buttons on the + form hopefully with input in the correct fields, which we check for firsrt. */ + //initialise no input errors assumed initially before we test + $InputError = 0; + if (strlen($_POST['FactorName']) > 40 or strlen($_POST['FactorName']) == 0 or $_POST['FactorName'] == '') { + $InputError = 1; + prnMsg(_('The factoring company name must be entered and be forty characters or less long'), 'error'); + } + /* If no input errors have been recieved */ + if ($InputError != 1) { + //And if its not a new part then update existing one + if (!isset($_POST['New'])) { + $sql = "UPDATE factorcompanies SET coyname='" . $_POST['FactorName'] . "', address1='" . $_POST['Address1'] . "', address2='" . $_POST['Address2'] . "', address3='" . $_POST['Address3'] . "', @@ -49,19 +39,15 @@ telephone='" . $_POST['Telephone'] . "', fax='" . $_POST['Fax'] . "', email='" . $_POST['Email'] . " ' - WHERE id = " .$FactorID; - - $ErrMsg = _('The factoring company could not be updated because'); - $DbgMsg = _('The SQL that was used to update the factor but failed was'); - - $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); - - prnMsg(_('The factoring company record for') . ' ' . $_POST['FactorName'] . ' ' . _('has been updated'),'success'); - - //If it is a new part then insert it - } else { - - $sql = "INSERT INTO factorcompanies (id, + WHERE id = " . $FactorID; + $ErrMsg = _('The factoring company could not be updated because'); + $DbgMsg = _('The SQL that was used to update the factor but failed was'); + $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); + prnMsg(_('The factoring company record for') . ' ' . $_POST['FactorName'] . ' ' . _('has been updated'), 'success'); + //If it is a new part then insert it + + } else { + $sql = "INSERT INTO factorcompanies (id, coyname, address1, address2, @@ -74,7 +60,7 @@ fax, email) VALUES (null, - '" .$_POST['FactorName'] . "', + '" . $_POST['FactorName'] . "', '" . $_POST['Address1'] . "', '" . $_POST['Address2'] . "', '" . $_POST['Address3'] . "', @@ -84,90 +70,75 @@ '" . $_POST['ContactName'] . "', '" . $_POST['Telephone'] . "', '" . $_POST['Fax'] . "', - '" . $_POST['Email'] . "')"; - - $ErrMsg = _('The factoring company') . ' ' . $_POST['FactorName'] . ' ' . _('could not be added because'); - $DbgMsg = _('The SQL that was used to insert the factor but failed was'); - - $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); - - prnMsg(_('A new factoring company for') . ' ' . $_POST['FactorName'] . ' ' . _('has been added to the database'),'success'); - - unset ($FactorID); - unset($_POST['FactorName']); - unset($_POST['Address1']); - unset($_POST['Address2']); - unset($_POST['Address3']); - unset($_POST['Address4']); - unset($_POST['Address5']); - unset($_POST['Address6']); - unset($_POST['ContactName']); - unset($_POST['Telephone']); - unset($_POST['Fax']); - unset($_POST['Email']); - - } - // But if errors were found in the input - } else { - prnMsg(_('Validation failed') . _('no updates or deletes took place'),'warn'); - } - -/* If neither the Update or Insert buttons were pushed was it the delete button? */ - + '" . $_POST['Email'] . "')"; + $ErrMsg = _('The factoring company') . ' ' . $_POST['FactorName'] . ' ' . _('could not be added because'); + $DbgMsg = _('The SQL that was used to insert the factor but failed was'); + $result = DB_query($sql, $db, $ErrMsg, $DbgMsg); + prnMsg(_('A new factoring company for') . ' ' . $_POST['FactorName'] . ' ' . _('has been added to the database'), 'success'); + unset($FactorID); + unset($_POST['FactorName']); + unset($_POST['Address1']); + unset($_POST['Address2']); + unset($_POST['Address3']); + unset($_POST['Address4']); + unset($_POST['Address5']); + unset($_POST['Address6']); + unset($_POST['ContactName']); + unset($_POST['Telephone']); + unset($_POST['Fax']); + unset($_POST['Email']); + } + // But if errors were found in the input + + } else { + prnMsg(_('Validation failed') . _('no updates or deletes took place'), 'warn'); + } + /* If neither the Update or Insert buttons were pushed was it the delete button? */ } elseif (isset($_POST['delete']) AND $_POST['delete'] != '') { - - $CancelDelete = 0; - -// PREVENT DELETES IF DEPENDENT RECORDS IN 'SuppTrans' , PurchOrders, SupplierContacts - - $sql= "SELECT COUNT(*) FROM suppliers WHERE factorcompanyid='$FactorID'"; - $result = DB_query($sql, $db); - $myrow = DB_fetch_row($result); - if ($myrow[0] > 0) { - $CancelDelete = 1; - prnMsg(_('Cannot delete this factor because there are suppliers using them'),'warn'); - echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('suppliers using this factor company'); - } - - if ($CancelDelete == 0) { - $sql="DELETE FROM factorcompanies WHERE id='$FactorID'"; - $result = DB_query($sql, $db); - prnMsg(_('Factoring company record record for') . ' ' . $_POST['FactorName'] . ' ' . _('has been deleted'),'success'); - unset($FactorID); - unset($_SESSION['FactorID']); - } //end if Delete factor + $CancelDelete = 0; + // PREVENT DELETES IF DEPENDENT RECORDS IN 'SuppTrans' , PurchOrders, SupplierContacts + $sql = "SELECT COUNT(*) FROM suppliers WHERE factorcompanyid='$FactorID'"; + $result = DB_query($sql, $db); + $myrow = DB_fetch_row($result); + if ($myrow[0] > 0) { + $CancelDelete = 1; + prnMsg(_('Cannot delete this factor because there are suppliers using them'), 'warn'); + echo '<br>' . _('There are') . ' ' . $myrow[0] . ' ' . _('suppliers using this factor company'); + } + if ($CancelDelete == 0) { + $sql = "DELETE FROM factorcompanies WHERE id='$FactorID'"; + $result = DB_query($sql, $db); + prnMsg(_('Factoring company record record for') . ' ' . $_POST['FactorName'] . ' ' . _('has been deleted'), 'success'); + unset($FactorID); + unset($_SESSION['FactorID']); + } //end if Delete factor + } - /* So the page hasn't called itself with the input/update/delete/buttons */ - /* If it didn't come with a $FactorID it must be a completely fresh start, so choose a new $factorID or give the - option to create a new one*/ - -if (!isset($FactorID) or ($FactorID==1 and isset($_POST['amend']))) { - - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . "?" . SID . "'>"; - - echo "<input type='hidden' name='New' VALUE='No'>"; - - $result=DB_query('SELECT id, coyname FROM factorcompanies', $db); -// $myrow = DB_fetch_array($result); - echo '<table><tr><td>'; - echo "<select tabindex=1 name='FactorID'>"; - while ($myrow = DB_fetch_array($result)) { - echo '<option selected VALUE=' . $myrow['id'] . '>' . $myrow['coyname']; +option to create a new one*/ +if (!isset($FactorID) or ($FactorID == 1 and isset($_POST['amend']))) { + echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . "?" . SID . "'>"; + echo "<input type='hidden' name='New' VALUE='No'>"; + $result = DB_query('SELECT id, coyname FROM factorcompanies', $db); + $NumberOfRows=DB_num_rows($result); + // $myrow = DB_fetch_array($result); + echo '<table><tr><td>'; + echo "<select tabindex=1 name='FactorID'>"; + while ($myrow = DB_fetch_array($result)) { + echo '<option selected VALUE=' . $myrow['id'] . '>' . $myrow['coyname']; + } + echo "</select></td></tr></table><p><div class='centre'>"; + if ($NumberOfRows>0) { + echo "<input tabindex=2 type='Submit' name='amend' VALUE='" . _('Amend Factor') . "'>"; } - echo "</select></td></tr></table><p><div class='centre'><input TABINDEX=2 type='Submit' name='amend' VALUE='" . _('Amend Factor') . "'>"; - echo "<br><input TABINDEX=3 type='Submit' name='Create' VALUE='" . _('Create New Factor') . "'>"; - echo '</div></form>'; - + echo "<input tabindex=3 type='Submit' name='Create' VALUE='" . _('Create New Factor') . "'>"; + echo '</div></form>'; } else { - - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . "?" . SID . "'>"; - echo '<table>'; - - if (isset($_POST['New']) and $_POST['New']=="No") { - - $sql = "SELECT id, + echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . "?" . SID . "'>"; + echo '<table>'; + if (isset($_POST['New']) and $_POST['New'] == "No") { + $sql = "SELECT id, coyname, address1, address2, @@ -180,64 +151,55 @@ fax, email FROM factorcompanies - WHERE id = ".$FactorID; - - $result = DB_query($sql, $db); - $myrow = DB_fetch_array($result); - - $_POST['FactorName'] = $myrow['coyname']; - $_POST['Address1'] = $myrow['address1']; - $_POST['Address2'] = $myrow['address2']; - $_POST['Address3'] = $myrow['address3']; - $_POST['Address4'] = $myrow['address4']; - $_POST['Address5'] = $myrow['address5']; - $_POST['Address6'] = $myrow['address6']; - $_POST['ContactName'] = $myrow['contact']; - $_POST['Telephone'] = $myrow['telephone']; - $_POST['Fax'] = $myrow['fax']; - $_POST['Email'] = $myrow['email']; - - echo "<input type=hidden name='FactorID' VALUE='$FactorID'>"; - - } else { - // its a new factor being added - echo "<input type=hidden name='New' VALUE='Yes'>"; - echo '<tr><td>' . _('Factor company Name') . ":</td><td><input tabindex=1 type='text' name='FactorName' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 1') . ":</td><td><input tabindex=2 type='text' name='Address1' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 2') . ":</td><td><input tabindex=3 type='text' name='Address2' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 3') . ":</td><td><input tabindex=4 type='text' name='Address3' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 4') . ":</td><td><input tabindex=5 type='text' name='Address4' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 5') . ":</td><td><input tabindex=6 type='text' name='Address5' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 6') . ":</td><td><input tabindex=7 type='text' name='Address6' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Contact Name') . ":</td><td><input tabindex=8 type='text' name='ContactName' size=13 maxlength=25></td></tr>"; - echo '<tr><td>' . _('Telephone') . ":</td><td><input tabindex=9 type='text' name='Telephone' size=13 maxlength=25></td></tr>"; - echo '<tr><td>' . _('Fax') . ":</td><td><input tabindex=10 type='text' name='Fax' VALUE=0 size=13 maxlength=25></td></tr>"; - echo '<tr><td>' . _('Email') . ":</td><td><input tabindex=11 type='text' name='Email' size=55 maxlength=55></td></tr>"; - echo '</form>'; - } - - - if (isset($_POST['New']) and $_POST['New']=="Yes") { - echo "</table><p><div class='centre'><input tabindex=12 type='Submit' name='submit' VALUE='" . _('Insert New Factor') . "'></div>"; - } else { - echo '<tr><td>' . _('Factor company Name') . ":</td><td><input tabindex=1 type='text' name='FactorName' VALUE='" . $_POST['FactorName'] . "' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 1') . ":</td><td><input tabindex=2 type='text' name='Address1' VALUE='" . $_POST['Address1'] . "' ' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 2') . ":</td><td><input tabindex=3 type='text' name='Address2' VALUE='" . $_POST['Address2'] . "' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 3') . ":</td><td><input tabindex=4 type='text' name='Address3' VALUE='" . $_POST['Address3'] . "' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 4') . ":</td><td><input tabindex=5 type='text' name='Address4' VALUE='" . $_POST['Address4'] . "' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 5') . ":</td><td><input tabindex=6 type='text' name='Address5' VALUE='" . $_POST['Address5'] . "' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Address Line 6') . ":</td><td><input tabindex=7 type='text' name='Address6' VALUE='" . $_POST['Address6'] . "' size=42 maxlength=40></td></tr>"; - echo '<tr><td>' . _('Contact Name') . ":</td><td><input tabindex=8 type='text' name='ContactName' VALUE='" . $_POST['ContactName'] . "' size=13 maxlength=25></td></tr>"; - echo '<tr><td>' . _('Telephone') . ":</td><td><input tabindex=9 type='text' name='Telephone' VALUE='" . $_POST['Telephone'] . "' size=13 maxlength=25></td></tr>"; - echo '<tr><td>' . _('Fax') . ":</td><td><input tabindex=10 type='text' name='Fax' VALUE='" . $_POST['Fax'] . "' VALUE=0 size=13 maxlength=25></td></tr>"; - echo '<tr><td>' . _('Email') . ":</td><td><input tabindex=11 type='text' name='Email' VALUE='" . $_POST['Email'] . "' size=55 maxlength=55></td></tr>"; - echo '</form>'; - echo "<p></table><div class='centre'><input tabindex=13 type='Submit' name='submit' VALUE='" . _('Update Factor') . "'>"; - prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); - echo "<input tabindex=14 type='Submit' name='delete' VALUE='" . _('Delete Factor') . "' onclick=\"return confirm('" . _('Are you sure you wish to delete this factoring company?') . "');\"></form></div>"; - } - + WHERE id = " . $FactorID; + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + $_POST['FactorName'] = $myrow['coyname']; + $_POST['Address1'] = $myrow['address1']; + $_POST['Address2'] = $myrow['address2']; + $_POST['Address3'] = $myrow['address3']; + $_POST['Address4'] = $myrow['address4']; + $_POST['Address5'] = $myrow['address5']; + $_POST['Address6'] = $myrow['address6']; + $_POST['ContactName'] = $myrow['contact']; + $_POST['Telephone'] = $myrow['telephone']; + $_POST['Fax'] = $myrow['fax']; + $_POST['Email'] = $myrow['email']; + echo "<input type=hidden name='FactorID' VALUE='$FactorID'>"; + } else { + // its a new factor being added + echo "<input type=hidden name='New' VALUE='Yes'>"; + echo '<tr><td>' . _('Factor company Name') . ":</td><td><input tabindex=1 type='text' name='FactorName' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 1') . ":</td><td><input tabindex=2 type='text' name='Address1' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 2') . ":</td><td><input tabindex=3 type='text' name='Address2' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 3') . ":</td><td><input tabindex=4 type='text' name='Address3' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 4') . ":</td><td><input tabindex=5 type='text' name='Address4' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 5') . ":</td><td><input tabindex=6 type='text' name='Address5' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 6') . ":</td><td><input tabindex=7 type='text' name='Address6' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Contact Name') . ":</td><td><input tabindex=8 type='text' name='ContactName' size=13 maxlength=25></td></tr>"; + echo '<tr><td>' . _('Telephone') . ":</td><td><input tabindex=9 type='text' name='Telephone' size=13 maxlength=25></td></tr>"; + echo '<tr><td>' . _('Fax') . ":</td><td><input tabindex=10 type='text' name='Fax' VALUE=0 size=13 maxlength=25></td></tr>"; + echo '<tr><td>' . _('Email') . ":</td><td><input tabindex=11 type='text' name='Email' size=55 maxlength=55></td></tr>"; + } + if (isset($_POST['New']) and $_POST['New'] == "Yes") { + echo "</table><p><div class='centre'><input tabindex=12 type='Submit' name='submit' VALUE='" . _('Insert New Factor') . "'></div>"; + } else { + echo '<tr><td>' . _('Factor company Name') . ":</td><td><input tabindex=1 type='text' name='FactorName' VALUE='" . $_POST['FactorName'] . "' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 1') . ":</td><td><input tabindex=2 type='text' name='Address1' VALUE='" . $_POST['Address1'] . "' ' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 2') . ":</td><td><input tabindex=3 type='text' name='Address2' VALUE='" . $_POST['Address2'] . "' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 3') . ":</td><td><input tabindex=4 type='text' name='Address3' VALUE='" . $_POST['Address3'] . "' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 4') . ":</td><td><input tabindex=5 type='text' name='Address4' VALUE='" . $_POST['Address4'] . "' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 5') . ":</td><td><input tabindex=6 type='text' name='Address5' VALUE='" . $_POST['Address5'] . "' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Address Line 6') . ":</td><td><input tabindex=7 type='text' name='Address6' VALUE='" . $_POST['Address6'] . "' size=42 maxlength=40></td></tr>"; + echo '<tr><td>' . _('Contact Name') . ":</td><td><input tabindex=8 type='text' name='ContactName' VALUE='" . $_POST['ContactName'] . "' size=13 maxlength=25></td></tr>"; + echo '<tr><td>' . _('Telephone') . ":</td><td><input tabindex=9 type='text' name='Telephone' VALUE='" . $_POST['Telephone'] . "' size=13 maxlength=25></td></tr>"; + echo '<tr><td>' . _('Fax') . ":</td><td><input tabindex=10 type='text' name='Fax' VALUE='" . $_POST['Fax'] . "' VALUE=0 size=13 maxlength=25></td></tr>"; + echo '<tr><td>' . _('Email') . ":</td><td><input tabindex=11 type='text' name='Email' VALUE='" . $_POST['Email'] . "' size=55 maxlength=55></td></tr>"; + echo "<p></table><div class='centre'><input tabindex=13 type='Submit' name='submit' VALUE='" . _('Update Factor') . "'>"; + prnMsg(_('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); + echo "<input tabindex=14 type='Submit' name='delete' VALUE='" . _('Delete Factor') . "' onclick=\"return confirm('" . _('Are you sure you wish to delete this factoring company?') . "');\"></form></div>"; + } + echo '</form>'; } // end of main ifs - -include('includes/footer.inc'); +include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/Suppliers.php =================================================================== --- trunk/Suppliers.php 2009-11-19 06:17:13 UTC (rev 3050) +++ trunk/Suppliers.php 2009-11-19 11:49:22 UTC (rev 3051) @@ -635,7 +635,7 @@ $result=DB_query('SELECT id, coyname FROM factorcompanies', $db); echo '<tr><td>' . _('Factor Company') . ":</td><td><select name='FactorID'>"; - + echo '<option VALUE=0>' . _('None'); while ($myrow = DB_fetch_array($result)) { if (isset($_POST['FactorID']) and $_POST['FactorID'] == $myrow['id']){ echo '<option selected VALUE=' . $myrow['id'] . '>' . $myrow['coyname']; @@ -769,7 +769,7 @@ $result=DB_query('SELECT id, coyname FROM factorcompanies', $db); echo '<tr><td>' . _('Factor Company') . ":</td><td><select name='FactorID'>"; - + echo '<option VALUE=0>' . _('None'); while ($myrow = DB_fetch_array($result)) { if ($_POST['FactorID'] == $myrow['id']){ echo '<option selected VALUE=' . $myrow['id'] . '>' . $myrow['coyname']; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2009-11-19 06:17:13 UTC (rev 3050) +++ trunk/doc/Change.log.html 2009-11-19 11:49:22 UTC (rev 3051) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p> +<p>19/11/09 Tim: Improvements to factor company implementaton. <p>18/11/09 Tim: default.css - Correction to jelly theme <p>18/11/09 Tim: PO_Header.php - Add direct link to raise a Purchase Order <p>18/11/09 Tim: PO_PDFOrderPageHeader.inc - Include payment terms on the order. Modified: trunk/sql/mysql/upgrade3.11-3.12.sql =================================================================== --- trunk/sql/mysql/upgrade3.11-3.12.sql 2009-11-19 06:17:13 UTC (rev 3050) +++ trunk/sql/mysql/upgrade3.11-3.12.sql 2009-11-19 11:49:22 UTC (rev 3051) @@ -39,3 +39,7 @@ ALTER TABLE `purchorders` ADD COLUMN `supptel` varchar(30) NOT NULL DEFAULT '' AFTER suppliercontact; ALTER TABLE `purchorders` ADD COLUMN `tel` varchar(15) NOT NULL DEFAULT '' AFTER deladd6; ALTER TABLE `purchorders` ADD COLUMN `port` varchar(40) NOT NULL DEFAULT '' ; + +ALTER TABLE `suppliers` DROP FOREIGN KEY `suppliers_ibfk_4`; +UPDATE `suppliers` SET `factorcompanyid`=0 WHERE `factorcompanyid`=1; +DELETE FROM `factorcompanies` WHERE `coyname`='None'; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |