Editing Letters of “Nature of Third part”

Hello Dollibar developers gurus, I want to edit the Letters that represent “Nature of Third party” in the List of third parties page. I need to know the file and directory. I have picture attached for clarification. Thanks in anticipation.

Wait a minute, could it be this task is kind of tricky for our guru here? Since six days now have got no reply on this topic. I know there are guru who can solve this issue out there, kindly help me out on this task . May God bless you. Thank you.

I normally take a look at the page URL to locate the folder and file
immagine

It goes beyond taking a look at url bro, because there are some file that are actually linked to another which there variables are now called . So the actual file that belongs to where the line of code that is responsible for those alphabet that stand for “Customer” “Prospect and Customer” is what I am looking for.

Thanks for your response.

Just to explain the long way thinks are done;

  1. First, find the string that has to be translated in the lang file. i.e. “Nature of Third Party” corresponds to “NatureOfThirdParty”
  2. In the “list.php” find the field that corresponds to the string. I.e. for “NatureOfThirdParty” the field is “customerorsupplier”
  3. In the same file, search for the field name i.e. “customerorsupplier”. You can encounter multiples definitions and usually, the last one is that displays the field. In this case:
// Type
   if (!empty($arrayfields['customerorsupplier']['checked'])) {
   	print '<td class="center">';
   	print $companystatic->getTypeUrl(1);
   	print '</td>';
   	if (!$i) {
   		$totalarray['nbfield']++;
   	}
   }

And we have the function that shows the field i.e. “$companystatic->getTypeUrl(1);”

What is left to do is open the “.class.php" file in the "/class” folder. As we are already in “societe” as main folder, that means we need to open “/societe/class/societe.class.php” and search for “public function getTypeUrl(” (note that I use just one bracket, as there are or can be arguments to the function, and if we use getTypeUrl() we may find nothing).

And as result: here we are. All the options to output the fields. We have to edit the part Between “> something here ” as this is what we see on the browser.

For example, if we change '.dol_substr($langs->trans("Prospect"), 0, 1).' to '.dol_substr($langs->trans("Prospect"), 0, 4).' instead of “P” we will see “Pros”, and if we change it to just '.$langs->trans("Prospect").' we will see the full word “Prospect” translated to the current language.

And if you want a completely different letter or word, instead of all the above just replace '.dol_substr($langs->trans("Prospect"), 0, 1).' with whatever you want.

IMPORTANT NOTE: Any manual change to the core Dolibarr files that is done directly, instead of using a module, will be lost upon version upgrade

Wow Boss…this is so interesting…thanks for your time putting this together. I really appreciate you Boss. I will work on it and get back to you boss. Many thanks