> > Feature (approved)

add tag drop down list with types like (customer, supplier, etc)

Summary

approved
Jul 19, 2006
30 min ... 60 min
100%
Sep 12, 2006
Jul 19, 2006 / pixtur
Jan 5, 2009 / phsouzacruz
burger
 

Attached files

No files uploaded
 

8 Comments

guest:list of roles a company or person could have

12 years ago (4. update 12 years ago) -

companyπ

  1. costumer/client (Kunde)
  2. prospective costumer/client (Interessent)
  3. suppplier (Lieferant)
  4. partner (Partnerfirma) ?

I think, to one of these three you could assign every company you have to deal with. Perhaps you could add "partner" or something like that for a company, that's not really a costumer nor a supplier, but you work with?

personπ

  1. employee (fester Mitarbeiter)
  2. freelancer (freier Mitarbeiter)
  3. student (Werksstudent)
  4. apprentice (Azubi)
  5. trainee (Praktikant)
  6. ex-employee (ehemaliger Mitarbeiter)
  7. customer/client (Kunde)
  8. supplier (Lieferant)

I think, with these you could assign a role to every potential person, you have to deal with.

burger:Question

12 years ago (2. update 12 years ago)

see

pixtur:very good...

12 years ago (2. update 12 years ago)

Please note the following points:
  • please add the constants to std/defines.inc.php
  • for translation the actual texts must be defined in std/constant_names.inc.php
I am not sure with the attribute ptype maybe label or role would be more understandable...

Do not hesitate to ask.


burger:Comment

12 years ago (3. update 12 years ago)

Hmm ...


I think client, prospective client, supplier and partner are neither roles nor labels.
They are specific types of companies.

So what do you think about to call them 'company_types' (and for persons 'person_types)?

pixtur:hmm...

12 years ago (2. update 12 years ago)

For the database field this names are too long, because we already are in the 'company' table. But just "type" is too ambiguous...

Why not use "category"?

tom

burger:

12 years ago

I have insterted the new code.
It would be kind if you would test it.

pixtur:Looked at the code.

12 years ago (2. update 12 years ago)

Looks fine so far...

No tabs, pleaseπ

  • please do not use tab-characters but four hard spaces

getXXX ?π

Company::getCompanies() is ok, but it might be better refactored (see ). I know this comes a little bit late and streber is pretty inconsistent with those query functions but we should invests some time to make all of those functions work similar.
This could also include to rename them to something like Company::getFromDB() (or fetch, query, etc...).

checking user rightsπ

  • as for checking user-rights, working with the profile is not quiet correct.


from db/class_file.inc.php

		if ($auth->cur_user->profile == PROFILE_ADMIN)
		{
			$str_projectperson = "";
		}
		else
		{
			$str_projectperson = "AND upp.person = {$auth->cur_user->id}";
		}

should be written as...

from db/class_file.inc.php

		if ($auth->cur_user->user_rights & RIGHT_VIEWALL)
		{
			$str_projectperson = "";
		}
		else
		{
			$str_projectperson = "AND upp.person = {$auth->cur_user->id}";
		}

Note that the "profile" is just the default right setting and can be adjusted later. RIGHT_VIEW_ALL is what you want here.

keep others up to dateπ

  • when modifying the Database structure you must increase the version at conf/conf.inc.php. Doing the changes in v0.0681 would automatically updating the other developers database. Do not be affraid forminor version increases. I will adjust your code here, to test you changes.

Naming page-functionsπ

  • when naming page functions please start with the rough and become finer at the end of the name. I would suggest to rename:
  • clientList -> companyListClients
  • prosclientList -> companyListPropective
  • supplierList -> companyListSupplier
and so on...

please change your code at this point


Over all your changes are really excellent. I am honestly surprised that you got into streber's code so quickly. Thank you!











burger:Done

12 years ago

I changed the code at the respective points.

And thank you for your compliment :-).