Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to change Sales Type code from 2 characters
09-27-2015, 05:51 PM,
#3
RE: Need to change Sales Type code from 2 characters
It is not too hard, but there are several tables that need changing:

ALTER TABLE salestypes CHANGE COLUMN typeabbrev typeabbrev VARCHAR(4);
ALTER TABLE cogsglpostings CHANGE COLUMN salestype salestype VARCHAR(4);
ALTER TABLE debtorsmaster CHANGE COLUMN salestype salestype VARCHAR(4);
ALTER TABLE discountmatrix CHANGE COLUMN salestype salestype VARCHAR(4);
ALTER TABLE pricematrix CHANGE COLUMN salestype salestype VARCHAR(4);
ALTER TABLE prices CHANGE COLUMN typeabbrev typeabbrev VARCHAR(4);
ALTER TABLE salesglpostings CHANGE COLUMN salestype salestype VARCHAR(4);

There maybe others but I think that is all. Then you need to widen the input field in SalesTypes.php by changing the line

<td><input type="text" ' . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) .' size="3" maxlength="2" name="TypeAbbrev" /></td>

to

<td><input type="text" ' . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) .' size="5" maxlength="4" name="TypeAbbrev" /></td>

and changing the input checking line from

if (mb_strlen($_POST['TypeAbbrev']) > 2) {

to

if (mb_strlen($_POST['TypeAbbrev']) > 4) {

Thanks
Tim
Reply


Messages In This Thread
RE: Need to change Sales Type code from 2 characters - by TimSchofield - 09-27-2015, 05:51 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)