Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need to change Sales Type code from 2 characters
09-26-2015, 09:34 PM
Post: #1
Information Need to change Sales Type code from 2 characters
Hello,

I am new to WebErp and i want to know is it possible to change the Sales Type code characters from 2 to 4?

Regards,
Sandeep.
Find all posts by this user
Quote this message in a reply
09-27-2015, 01:15 PM
Post: #2
RE: Need to change Sales Type code from 2 characters
Hi, Sandeep,

It's not easy for a new user to change it in my opinion. You have to modify at least salestypes table and SalesTypes.php script.
Since sales types has been used in other place.
I'm wondering if you really need to change it. The sales type code is used for system use only, the Sales Types description are use in each interface.

Best regards!

Exson
Find all posts by this user
Quote this message in a reply
09-27-2015, 05:51 PM
Post: #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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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