Merge remote-tracking branch 'Upstream/develop' into develop-68
This commit is contained in:
commit
e0f2c41a37
@ -4,15 +4,14 @@ How to contribute to Dolibarr
|
||||
Bug reports and feature requests
|
||||
--------------------------------
|
||||
|
||||
*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
|
||||
<a name=not-a-support-forum></a>*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum).
|
||||
|
||||
**NEW**
|
||||
|
||||
Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
3. Report with as much detail as possible ([Use screenshots or even screencasts whenever possible](https://help.github.com/articles/issue-attachments)).
|
||||
4. Tell us the version you are using!
|
||||
3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
|
||||
|
||||
We're still figuring out how to migrate old issues to GitHub. In the meantime, they are still available at [Doliforge](https://doliforge.org/projects/dolibarr).
|
||||
|
||||
@ -41,9 +40,45 @@ Choose your base branch accordingly.
|
||||
### General rules
|
||||
Please don't edit the ChangeLog file. A project manager will update it from your commit messages.
|
||||
|
||||
### Commits
|
||||
### <a name=commits></a>Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
```
|
||||
[KEYWORD] [ISSUENUM] DESC
|
||||
|
||||
LONGDESC
|
||||
```
|
||||
|
||||
#### Keyword
|
||||
In uppercase to appear in ChangeLog when generated.
|
||||
|
||||
The keyword can be ommitted if your commit does not fit in any of the following categories:
|
||||
- Fix: for a bug fix
|
||||
- Close: for closing a referenced feature request
|
||||
- New: for an unreferenced new feature (Opening a feature request and using close is prefered)
|
||||
|
||||
#### Issuenum
|
||||
If your commit fixes a referenced bug or feature request.
|
||||
|
||||
In the form of a # followed by the GitHub issue number.
|
||||
|
||||
#### Desc
|
||||
A short description of the commit content.
|
||||
|
||||
This should ideally be less than 50 characters.
|
||||
|
||||
#### LongDesc
|
||||
A long description of the commit content.
|
||||
|
||||
You can really go to town here and explain in depth what you've been doing.
|
||||
|
||||
Feel free to express technical details, use cases or anything relevant to the current commit.
|
||||
|
||||
This section can span multiple lines.
|
||||
|
||||
Try to keep lines under 72 characters.
|
||||
|
||||
#### Samples
|
||||
<pre>
|
||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
@ -57,8 +92,10 @@ Long description (Can span accross multiple lines).
|
||||
</pre>
|
||||
|
||||
### Pull Requests
|
||||
When submitting a pull request, use same rule than Commits. With upper case keyword to appear into ChangeLog.
|
||||
When submitting a pull request, use same rule as [Commits](#commits) for the message.
|
||||
|
||||
If your pull request only contains one commit, GitHub will be smart enough to fill it for you.
|
||||
Otherwise, please be a bit verbose about what you're providing.
|
||||
|
||||
### Resources
|
||||
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||
@ -67,18 +104,18 @@ Translations
|
||||
------------
|
||||
The source language (en_US) is maintained in the repository. See the [Code](#code) section above.
|
||||
|
||||
All other translations are managed online at [Transifex](https://www.transifex.com/projects/p/dolibarr).
|
||||
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
|
||||
|
||||
Join an existing translation team or create your own and translate into the interface.
|
||||
|
||||
Your translations will be available in the next major release.
|
||||
|
||||
### Resources
|
||||
[Translator documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||
[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation)
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
|
||||
|
||||
*You need to create an account before being able to edit.*
|
||||
*Note*: to help prevent spam, you need to create an account before being able to edit.
|
||||
|
||||
|
||||
@ -40,10 +40,28 @@ enable_install_upgrade_wizard() {
|
||||
rm -f /var/lib/dolibarr/documents/install.lock
|
||||
}
|
||||
|
||||
|
||||
php_install() {
|
||||
if which php5enmod >/dev/null 2>&1 ;then
|
||||
# php5endmod exists for ubuntu only
|
||||
echo "Enable php module mysqli with php5enmod"
|
||||
php5enmod mysqli
|
||||
fi
|
||||
}
|
||||
|
||||
apache_install() {
|
||||
webserver=$1
|
||||
|
||||
# Enable Apache 2 alias module
|
||||
if which a2enmod >/dev/null 2>&1 ;then
|
||||
echo "Enable apache module alias with a2enmod"
|
||||
a2enmod alias
|
||||
fi
|
||||
|
||||
# Enable dolibarr conf
|
||||
if which a2enconf >/dev/null 2>&1 ;then
|
||||
# a2enconf exists for ubuntu only
|
||||
echo "Enable link for Apache config file with a3enconf"
|
||||
a2enconf dolibarr
|
||||
else
|
||||
if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/dolibarr.conf ]; then
|
||||
@ -88,11 +106,7 @@ case "$1" in
|
||||
echo This is not a first install
|
||||
fi
|
||||
|
||||
# Apache 2 setup
|
||||
if which a2enmod >/dev/null 2>&1 ;then
|
||||
a2enmod alias
|
||||
fi
|
||||
|
||||
php_install
|
||||
apache_install
|
||||
lighttpd_install
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ If you want to build/test package locally:
|
||||
bzr branch lp:~yourlogin/+junk/debian-[dev|stable]
|
||||
cd debian-[dev|stable]
|
||||
bzr status
|
||||
-- Update files here --
|
||||
-- Update files here: Remove all (except .bzr dir) and overwrite. Restore version into the file changelog --
|
||||
bzr commit -m "Description of change"
|
||||
bzr push lp:~yourlogin/+junk/debian-[dev|stable]
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
|
||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||
</English>
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
<Char_Desc_45>DoliWamp, Dolibarr ERP/CRM for Windows</Char_Desc_45>
|
||||
<Char_Desc_80>DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation</Char_Desc_80>
|
||||
<Char_Desc_250>DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs.</Char_Desc_250>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_450>DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations.</Char_Desc_450>
|
||||
<Char_Desc_2000>DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop.
|
||||
DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file.</Char_Desc_2000>
|
||||
</English>
|
||||
|
||||
@ -282,7 +282,7 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -290,7 +290,7 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="noborder">'."\n";
|
||||
print '<table class="liste">'."\n";
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
BIN
doc/images/dolibarr_192x192.png
Normal file
BIN
doc/images/dolibarr_192x192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@ -201,7 +201,7 @@ if ($resql)
|
||||
}
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -209,7 +209,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<table class="liste">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Name")." / ".$langs->trans("Company"),$_SERVER["PHP_SELF"],"d.lastname",$param,"","",$sortfield,$sortorder);
|
||||
|
||||
@ -43,6 +43,21 @@ if (! $user->admin)
|
||||
|
||||
$specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional', 4=>'marketplace');
|
||||
|
||||
$familyinfo=array(
|
||||
'hr'=>array('position'=>'001', 'label'=>$langs->trans("ModuleFamilyHr")),
|
||||
'crm'=>array('position'=>'006', 'label'=>$langs->trans("ModuleFamilyCrm")),
|
||||
'financial'=>array('position'=>'009', 'label'=>$langs->trans("ModuleFamilyFinancial")),
|
||||
'products'=>array('position'=>'012', 'label'=>$langs->trans("ModuleFamilyProducts")),
|
||||
'projects'=>array('position'=>'015', 'label'=>$langs->trans("ModuleFamilyProjects")),
|
||||
'ecm'=>array('position'=>'018', 'label'=>$langs->trans("ModuleFamilyECM")),
|
||||
'technic'=>array('position'=>'021', 'label'=>$langs->trans("ModuleFamilyTechnic")),
|
||||
'portal'=>array('position'=>'040', 'label'=>$langs->trans("ModuleFamilyPortal")),
|
||||
'interface'=>array('position'=>'050', 'label'=>$langs->trans("ModuleFamilyInterface")),
|
||||
'base'=>array('position'=>'060', 'label'=>$langs->trans("ModuleFamilyBase")),
|
||||
'other'=>array('position'=>'100', 'label'=>$langs->trans("ModuleFamilyOther")),
|
||||
);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -124,22 +139,20 @@ foreach ($modulesdir as $dir)
|
||||
$objMod = new $modName($db);
|
||||
$modNameLoaded[$modName]=$dir;
|
||||
|
||||
if ($objMod->numero > 0)
|
||||
if (! $objMod->numero > 0)
|
||||
{
|
||||
$j = $objMod->numero;
|
||||
dol_syslog('a module descriptor must have a numero property', LOG_ERR);
|
||||
}
|
||||
else
|
||||
{
|
||||
$j = 1000 + $i;
|
||||
}
|
||||
|
||||
$j = $objMod->numero;
|
||||
|
||||
$modulequalified=1;
|
||||
|
||||
// We discard modules according to features level (PS: if module is activated we always show it)
|
||||
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
|
||||
if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0;
|
||||
if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0;
|
||||
// We discard modules according to property disabled
|
||||
if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) $modulequalified=0;
|
||||
// We discard modules according to property disabled
|
||||
if (! empty($objMod->hidden)) $modulequalified=false;
|
||||
|
||||
// Define array $categ with categ with at least one qualified module
|
||||
@ -147,13 +160,19 @@ foreach ($modulesdir as $dir)
|
||||
{
|
||||
$modules[$i] = $objMod;
|
||||
$filename[$i]= $modName;
|
||||
$orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number
|
||||
|
||||
$special = $objMod->special;
|
||||
$familykey = $objMod->family;
|
||||
|
||||
if ($special == 1) $familykey='interface';
|
||||
|
||||
$orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$j; // Sort by family, then by module number
|
||||
$dirmod[$i] = $dir;
|
||||
// Set categ[$i]
|
||||
$special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown';
|
||||
if ($objMod->version == 'development' || $objMod->version == 'experimental') $special='expdev';
|
||||
if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories
|
||||
else $categ[$special]=1;
|
||||
$specialstring = isset($specialtostring[$special])?$specialtostring[$special]:'unknown';
|
||||
if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring='expdev';
|
||||
if (isset($categ[$specialstring])) $categ[$specialstring]++; // Array of all different modules categories
|
||||
else $categ[$specialstring]=1;
|
||||
$j++;
|
||||
$i++;
|
||||
}
|
||||
@ -197,9 +216,9 @@ print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup');
|
||||
// Start to show page
|
||||
if (empty($mode)) $mode='common';
|
||||
if ($mode==='common') print $langs->trans("ModulesDesc")."<br>\n";
|
||||
if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."<br>\n";
|
||||
if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."<br>\n";
|
||||
if ($mode==='functional') print $langs->trans("ModulesJobDesc")."<br>\n";
|
||||
//if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."<br>\n";
|
||||
//if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."<br>\n";
|
||||
//if ($mode==='functional') print $langs->trans("ModulesJobDesc")."<br>\n";
|
||||
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
|
||||
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>\n";
|
||||
|
||||
@ -213,11 +232,12 @@ $categidx='common'; // Main
|
||||
if (! empty($categ[$categidx]))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||
$head[$h][1] = $langs->trans("ModulesCommon");
|
||||
$head[$h][1] = $langs->trans("AvailableModules");
|
||||
$head[$h][2] = 'common';
|
||||
$h++;
|
||||
}
|
||||
|
||||
/*
|
||||
$categidx='other'; // Other
|
||||
if (! empty($categ[$categidx]))
|
||||
{
|
||||
@ -244,6 +264,7 @@ if (! empty($categ[$categidx]))
|
||||
$head[$h][2] = 'functional';
|
||||
$h++;
|
||||
}
|
||||
*/
|
||||
|
||||
$categidx='expdev';
|
||||
if (! empty($categ[$categidx]))
|
||||
@ -287,28 +308,19 @@ if ($mode != 'marketplace')
|
||||
|
||||
$oldfamily='';
|
||||
|
||||
$familylib=array(
|
||||
'base'=>$langs->trans("ModuleFamilyBase"),
|
||||
'crm'=>$langs->trans("ModuleFamilyCrm"),
|
||||
'products'=>$langs->trans("ModuleFamilyProducts"),
|
||||
'hr'=>$langs->trans("ModuleFamilyHr"),
|
||||
'projects'=>$langs->trans("ModuleFamilyProjects"),
|
||||
'financial'=>$langs->trans("ModuleFamilyFinancial"),
|
||||
'ecm'=>$langs->trans("ModuleFamilyECM"),
|
||||
'technic'=>$langs->trans("ModuleFamilyTechnic"),
|
||||
'other'=>$langs->trans("ModuleFamilyOther")
|
||||
);
|
||||
|
||||
foreach ($orders as $key => $value)
|
||||
{
|
||||
$tab=explode('_',$value);
|
||||
$family=$tab[0]; $numero=$tab[1];
|
||||
$familypos=$tab[0]; $familykey=$tab[1]; $numero=$tab[2];
|
||||
|
||||
$modName = $filename[$key];
|
||||
$objMod = $modules[$key];
|
||||
|
||||
$special = $objMod->special;
|
||||
|
||||
//print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."<br>";
|
||||
if (($mode != (isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown') && $mode != 'expdev')
|
||||
//if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev')
|
||||
if (($special >= 4 && $mode != 'expdev')
|
||||
|| ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental')) continue; // Discard if not for current tab
|
||||
|
||||
if (! $objMod->getName())
|
||||
@ -329,28 +341,27 @@ if ($mode != 'marketplace')
|
||||
}
|
||||
|
||||
// Print a separator if we change family
|
||||
//print "<tr><td>xx".$oldfamily."-".$family."-".$atleastoneforfamily."<br></td><tr>";
|
||||
//if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) {
|
||||
if ($family!=$oldfamily)
|
||||
//print "<tr><td>xx".$oldfamily."-".$familykey."-".$atleastoneforfamily."<br></td><tr>";
|
||||
//if ($oldfamily && $familykey!=$oldfamily && $atleastoneforfamily) {
|
||||
if ($familykey!=$oldfamily)
|
||||
{
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td colspan="5">';
|
||||
$familytext=empty($familylib[$family])?$family:$familylib[$family];
|
||||
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||
print $familytext;
|
||||
print "</td>\n";
|
||||
print '<td align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
||||
print "</tr>\n";
|
||||
$atleastoneforfamily=0;
|
||||
//print "<tr><td>yy".$oldfamily."-".$family."-".$atleastoneforfamily."<br></td><tr>";
|
||||
//print "<tr><td>yy".$oldfamily."-".$familykey."-".$atleastoneforfamily."<br></td><tr>";
|
||||
}
|
||||
|
||||
$atleastoneforfamily++;
|
||||
|
||||
if ($family!=$oldfamily)
|
||||
if ($familykey!=$oldfamily)
|
||||
{
|
||||
$familytext=empty($familylib[$family])?$family:$familylib[$family];
|
||||
//print $familytext;
|
||||
$oldfamily=$family;
|
||||
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||
$oldfamily=$familykey;
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
|
||||
@ -205,7 +205,7 @@ if ($result)
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -213,7 +213,7 @@ if ($result)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">'."\n";
|
||||
print '<table class="liste">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
@ -246,7 +246,7 @@ if ($result)
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->select_country($search_country,'search_country');
|
||||
print $form->select_country($search_country,'search_country','',0,'maxwidth100');
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="center">';
|
||||
|
||||
@ -164,8 +164,7 @@ if ($result)
|
||||
print '<td align="right" class="nowrap">';
|
||||
if ($filteremail)
|
||||
{
|
||||
if ($obj->sendstatut==-1) print $langs->trans("MailingStatusError").' '.img_error();
|
||||
if ($obj->sendstatut==1) print $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"),'statut6');
|
||||
print $email::libStatutDest($obj->sendstatut,2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -371,7 +371,7 @@ if ($resql)
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -379,13 +379,13 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="liste">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("State"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("ThirdPartyType"),$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder);
|
||||
@ -427,13 +427,13 @@ if ($resql)
|
||||
print '<input type="text" class="flat" name="search_state" size="8" value="'.$search_state.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->select_country($search_country,'search_country');
|
||||
print $form->select_country($search_country,'search_country','',0,'maxwidth100');
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT));
|
||||
print '</td>';
|
||||
print '<td align="center" class="liste_titre">';
|
||||
print '<input class="flat" type="text" size="10" name="search_datec" value="'.$search_datec.'">';
|
||||
print '<input class="flat" type="text" size="6" name="search_datec" value="'.$search_datec.'">';
|
||||
print '</td>';
|
||||
|
||||
// Prospect level
|
||||
@ -494,6 +494,7 @@ if ($resql)
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSearch',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Status
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
|
||||
print '</td>';
|
||||
|
||||
@ -262,8 +262,6 @@ if ($resql)
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
// If the user can view prospects other than his'
|
||||
@ -295,7 +293,7 @@ if ($resql)
|
||||
}
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -303,6 +301,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'c.ref','',$param,'width="25%"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
|
||||
@ -186,12 +186,12 @@ if ($resql)
|
||||
|
||||
|
||||
if ($moreforfilter) {
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">'."\n";
|
||||
print '<table class="liste">'."\n";
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'b.rowid','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('DateOperationShort'),$_SERVER['PHP_SELF'],'b.dateo','',$param,'align="center"',$sortfield,$sortorder);
|
||||
|
||||
@ -552,7 +552,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
||||
* Salaries
|
||||
*/
|
||||
|
||||
if ($conf->salaries->enabled)
|
||||
if (! empty($conf->salaries->enabled))
|
||||
{
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 'p.datev';
|
||||
@ -626,13 +626,16 @@ if ($conf->salaries->enabled)
|
||||
* Donation
|
||||
*/
|
||||
|
||||
if ($conf->donation->enabled)
|
||||
if (! empty($conf->don->enabled))
|
||||
{
|
||||
print '<tr><td colspan="4">'.$langs->trans("Donation").'</td></tr>';
|
||||
$sql = "SELECT p.societe as name, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND fk_statut=2";
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
$sql.= " AND fk_statut in (1,2)";
|
||||
else
|
||||
$sql.= " AND fk_statut=2";
|
||||
if (! empty($date_start) && ! empty($date_end))
|
||||
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
|
||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||
|
||||
@ -477,85 +477,93 @@ $reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$acti
|
||||
/*
|
||||
* Salaries
|
||||
*/
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 'p.datev';
|
||||
} else {
|
||||
$column = 'p.datep';
|
||||
}
|
||||
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " GROUP BY p.label, dm";
|
||||
|
||||
dol_syslog("get social salaries payments");
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
if (! empty($conf->salaries->enabled))
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=false;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (! isset($decaiss[$obj->dm])) $decaiss[$obj->dm]=0;
|
||||
$decaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0;
|
||||
$decaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
$column = 'p.datev';
|
||||
} else {
|
||||
$column = 'p.datep';
|
||||
}
|
||||
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.label as nom, date_format($column,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " GROUP BY p.label, dm";
|
||||
|
||||
dol_syslog("get social salaries payments");
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=false;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (! isset($decaiss[$obj->dm])) $decaiss[$obj->dm]=0;
|
||||
$decaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0;
|
||||
$decaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* get dunning paiement
|
||||
*/
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " AND fk_statut=2";
|
||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||
|
||||
dol_syslog("get social salaries payments");
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
* Donation get dunning paiement
|
||||
*/
|
||||
if (! empty($conf->don->enabled))
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=false;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0;
|
||||
$encaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0;
|
||||
$encaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
$subtotal_ht = 0;
|
||||
$subtotal_ttc = 0;
|
||||
$sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as p";
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
if ($modecompta == 'CREANCES-DETTES')
|
||||
$sql.= " AND fk_statut in (1,2)";
|
||||
else
|
||||
$sql.= " AND fk_statut=2";
|
||||
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
|
||||
|
||||
dol_syslog("get donation payments");
|
||||
$result=$db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
$var=false;
|
||||
$i = 0;
|
||||
if ($num)
|
||||
{
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
if (! isset($encaiss[$obj->dm])) $encaiss[$obj->dm]=0;
|
||||
$encaiss[$obj->dm] += $obj->amount;
|
||||
|
||||
if (! isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm]=0;
|
||||
$encaiss_ttc[$obj->dm] += $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -104,6 +104,25 @@ if ($object->id)
|
||||
print '<tr><td width="20%">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</td><td width="30%">'.$object->lastname.'</td>';
|
||||
print '<td width="20%">'.$langs->trans("Firstname").'</td><td width="30%">'.$object->firstname.'</td></tr>';
|
||||
|
||||
// Company
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
||||
{
|
||||
if ($object->socid > 0)
|
||||
{
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->fetch($object->socid);
|
||||
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">'.$objsoc->getNomUrl(1).'</td></tr>';
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="3">';
|
||||
print $langs->trans("ContactNotLinkedToCompany");
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -276,6 +276,15 @@ if ($result)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("ThirdParty")." ".$langs->trans("or")." ".$langs->trans("EMail")."): ".$sall;
|
||||
}
|
||||
if ($search_firstlast_only)
|
||||
{
|
||||
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname")."): ".$search_firstlast_only;
|
||||
}
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
@ -285,20 +294,12 @@ if ($result)
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("ThirdParty")." ".$langs->trans("or")." ".$langs->trans("EMail")."): ".$sall;
|
||||
}
|
||||
if ($search_firstlast_only)
|
||||
{
|
||||
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname")."): ".$search_firstlast_only;
|
||||
}
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="liste">';
|
||||
|
||||
// Ligne des titres
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -484,9 +484,10 @@ class Form
|
||||
* @param string $htmlname Name of html select object
|
||||
* @param string $htmloption Options html on select object
|
||||
* @param integer $maxlength Max length for labels (0=no limit)
|
||||
* @param string $morecss More css class
|
||||
* @return string HTML string with select
|
||||
*/
|
||||
function select_country($selected='',$htmlname='country_id',$htmloption='',$maxlength=0)
|
||||
function select_country($selected='',$htmlname='country_id',$htmloption='',$maxlength=0,$morecss='minwidth300')
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@ -507,7 +508,7 @@ class Form
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$out.= '<select id="select'.$htmlname.'" class="flat selectcountry minwidth300" name="'.$htmlname.'" '.$htmloption.'>';
|
||||
$out.= '<select id="select'.$htmlname.'" class="flat selectcountry'.($morecss?' '.$morecss:'').'" name="'.$htmlname.'" '.$htmloption.'>';
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
if ($num)
|
||||
|
||||
@ -90,29 +90,30 @@ class FormProjets
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array with projects qualified for a third party
|
||||
* Returns an array with projects qualified for a third party
|
||||
*
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param int $selected Id project preselected
|
||||
* @param string $htmlname Nom de la zone html
|
||||
* @param int $maxlength Maximum length of label
|
||||
* @param int $option_only Return only html options lines without the select tag
|
||||
* @param int $show_empty Add an empty line
|
||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @param int $disabled Disabled
|
||||
* @param int $mode 0 for HTML mode and 1 for JSON mode
|
||||
* @param string $filterkey Key to filter
|
||||
* @return int Nber of project if OK, <0 if KO
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param int $selected Id project preselected
|
||||
* @param string $htmlname Nom de la zone html
|
||||
* @param int $maxlength Maximum length of label
|
||||
* @param int $option_only Return only html options lines without the select tag
|
||||
* @param int $show_empty Add an empty line
|
||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable)
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @param int $disabled Disabled
|
||||
* @param int $mode 0 for HTML mode and 1 for array return (to be used by json_encode for example)
|
||||
* @param string $filterkey Key to filter
|
||||
* @return int Nb of project if OK, <0 if KO
|
||||
*/
|
||||
function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '')
|
||||
function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '')
|
||||
{
|
||||
global $user,$conf,$langs;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$out='';
|
||||
|
||||
$outarray=array();
|
||||
|
||||
$hideunselectables = false;
|
||||
if (! empty($conf->global->PROJECT_HIDE_UNSELECTABLES)) $hideunselectables = true;
|
||||
|
||||
|
||||
@ -35,17 +35,20 @@
|
||||
class DolibarrModules // Can not be abstract, because we need to instantiant it into unActivateModule to be able to disable a module whose files were removed.
|
||||
{
|
||||
/**
|
||||
* @var int Module unique ID
|
||||
*/
|
||||
public $numero;
|
||||
|
||||
/**
|
||||
* @var string Module name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string Relative path to module style sheet
|
||||
* @deprecated
|
||||
* @see module_parts
|
||||
*/
|
||||
public $style_sheet = '';
|
||||
|
||||
/**
|
||||
* @var array Paths to create when module is activated
|
||||
*/
|
||||
@ -134,16 +137,6 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* @var int Module unique ID
|
||||
*/
|
||||
public $numero;
|
||||
|
||||
/**
|
||||
* @var string Module name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string Module version
|
||||
*/
|
||||
@ -193,7 +186,15 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
* @var bool Module is enabled globally (Multicompany support)
|
||||
*/
|
||||
public $core_enabled;
|
||||
|
||||
/**
|
||||
* @var string Relative path to module style sheet
|
||||
* @deprecated
|
||||
* @see module_parts
|
||||
*/
|
||||
public $style_sheet = '';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
@ -470,6 +471,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
if ($this->version == 'dolibarr' || $this->version == 'dolibarr_deprecated') return 'core';
|
||||
if (! empty($this->version) && ! in_array($this->version,array('experimental','development'))) return 'external';
|
||||
if (! empty($this->editor_name) || ! empty($this->editor_web)) return 'external';
|
||||
if ($this->numero >= 100000) return 'external';
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ class modCashDesk extends DolibarrModules
|
||||
// Key text used to identify module (for permission, menus, etc...)
|
||||
$this->rights_class = 'cashdesk';
|
||||
|
||||
$this->family = "products";
|
||||
$this->family = "portal";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "CashDesk module";
|
||||
|
||||
@ -43,7 +43,7 @@ class modLabel extends DolibarrModules
|
||||
$this->db = $db;
|
||||
$this->numero = 60;
|
||||
|
||||
$this->family = "other";
|
||||
$this->family = "technic";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Gestion des etiquettes";
|
||||
|
||||
@ -45,7 +45,7 @@ class modUser extends DolibarrModules
|
||||
$this->db = $db;
|
||||
$this->numero = 0;
|
||||
|
||||
$this->family = "base"; // Family for module (or "base" if core module)
|
||||
$this->family = "hr"; // Family for module (or "base" if core module)
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Gestion des utilisateurs (requis)";
|
||||
|
||||
@ -27,7 +27,7 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
/**
|
||||
* Class to describe a sync supplier web services module
|
||||
*/
|
||||
class modSyncSupplierWebServices extends DolibarrModules
|
||||
class modWebServicesClient extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
@ -38,12 +38,12 @@ class modSyncSupplierWebServices extends DolibarrModules
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
$this->numero = 2650;
|
||||
$this->numero = 2660;
|
||||
|
||||
$this->family = "technic";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Enable the client for external supplier web services";
|
||||
$this->description = "Enable the web service client to call external supplier web services";
|
||||
$this->version = 'experimental'; // 'experimental' or 'dolibarr' or version
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
124
htdocs/core/modules/modWebsite.class.php
Normal file
124
htdocs/core/modules/modWebsite.class.php
Normal file
@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup website Module website
|
||||
* \brief Website module descriptor.
|
||||
* \file htdocs/core/modules/modWebsite.class.php
|
||||
* \ingroup website
|
||||
* \brief Description and activation file for module Website
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class to describe Website module
|
||||
*/
|
||||
class modWebsite extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
$this->db = $db;
|
||||
$this->numero = 10000;
|
||||
|
||||
// Family can be 'crm','financial','hr','projects','products','ecm','technic','other'
|
||||
// It is used to group modules in module setup page
|
||||
$this->family = "portal";
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
$this->description = "Enable the public website with CMS features";
|
||||
$this->version = 'development'; // 'experimental' or 'dolibarr' or version
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
|
||||
$this->special = 0;
|
||||
// Name of image file used for this module.
|
||||
$this->picto='globe';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
|
||||
// Config pages
|
||||
//-------------
|
||||
$this->config_page_url = array("website.php");
|
||||
|
||||
// Dependancies
|
||||
//-------------
|
||||
$this->hidden = ! empty($conf->global->WEBSITE_MODULE_DISABLED); // A condition to disable module
|
||||
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of modules id this module is in conflict with
|
||||
$this->langfiles = array("website");
|
||||
|
||||
// Constants
|
||||
//-----------
|
||||
$this->const = array();
|
||||
|
||||
// New pages on tabs
|
||||
// -----------------
|
||||
$this->tabs = array();
|
||||
|
||||
// Boxes
|
||||
//------
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
$this->rights_class = 'website';
|
||||
$r=0;
|
||||
|
||||
$this->rights[$r][0] = 10001;
|
||||
$this->rights[$r][1] = 'Read website content';
|
||||
$this->rights[$r][3] = 1;
|
||||
$this->rights[$r][4] = 'read';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 10002;
|
||||
$this->rights[$r][1] = 'Create/modify website content';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'create';
|
||||
$r++;
|
||||
|
||||
$this->rights[$r][0] = 10003;
|
||||
$this->rights[$r][1] = 'Delete website content';
|
||||
$this->rights[$r][3] = 0;
|
||||
$this->rights[$r][4] = 'delete';
|
||||
$r++;
|
||||
|
||||
// Main menu entries
|
||||
$r=0;
|
||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'top', // This is a Left menu entry
|
||||
'titre'=>'Website',
|
||||
'url'=>'/website/index.php',
|
||||
'langs'=>'website', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>100,
|
||||
'enabled'=>'$conf->website->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'$user->rights->website->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
$r++;
|
||||
}
|
||||
}
|
||||
@ -197,9 +197,7 @@ print '<td> </td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->selectarray('status', array('0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")), $status, 1);
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print ' ';
|
||||
print '<input class="liste_titre" type="image" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print ' ';
|
||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -294,7 +292,7 @@ if (count($object->lines) > 0)
|
||||
print yn($line->status);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td align="right" class="nowrap">';
|
||||
if ($user->rights->cron->delete)
|
||||
{
|
||||
print "<a href=\"".$_SERVER["PHP_SELF"]."?id=".$line->id."&status=".$status."&action=delete\" title=\"".dol_escape_htmltag($langs->trans('CronDelete'))."\">".img_picto($langs->trans('CronDelete'),'delete')."</a> ";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
@ -201,7 +201,7 @@ if ($resql)
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -209,7 +209,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="liste">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder);
|
||||
@ -238,7 +238,7 @@ if ($resql)
|
||||
print '<td class="liste_titre"><input type="text" size="10" class="flat" name="search_town" value="'.$search_town.'"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->select_country($search_country,'search_country');
|
||||
print $form->select_country($search_country,'search_country','',0,'maxwidth100');
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="center">';
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
-- Visible in misc page
|
||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_NOT_INSTALLED','1','chaine','Setup is running',1,0);
|
||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development',1,0);
|
||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAIN_FEATURES_LEVEL','0','chaine','Level of features to show: -1=stable+deprecated, 0=stable only (default), 1=stable+experimental, 2=stable+experimental+development',1,0);
|
||||
insert into llx_const (name, value, type, note, visible, entity) values ('MAILING_LIMIT_SENDBYWEB','25','chaine','Number of targets to defined packet size when sending mass email',1,0);
|
||||
|
||||
-- Hidden and common to all entities
|
||||
|
||||
@ -285,14 +285,16 @@ ModuleSetup=Module setup
|
||||
ModulesSetup=Modules setup
|
||||
ModuleFamilyBase=System
|
||||
ModuleFamilyCrm=Customer Relation Management (CRM)
|
||||
ModuleFamilyProducts=Products Management
|
||||
ModuleFamilyHr=Human Resource Management
|
||||
ModuleFamilyProducts=Products Management (PM)
|
||||
ModuleFamilyHr=Human Resource Management (HR)
|
||||
ModuleFamilyProjects=Projects/Collaborative work
|
||||
ModuleFamilyOther=Other
|
||||
ModuleFamilyTechnic=Multi-modules tools
|
||||
ModuleFamilyExperimental=Experimental modules
|
||||
ModuleFamilyFinancial=Financial Modules (Accounting/Treasury)
|
||||
ModuleFamilyECM=Electronic Content Management (ECM)
|
||||
ModuleFamilyPortal=Web sites and other frontal application
|
||||
ModuleFamilyInterface=Interfaces with external systems
|
||||
MenuHandlers=Menu handlers
|
||||
MenuAdmin=Menu editor
|
||||
DoNotUseInProduction=Do not use in production
|
||||
@ -524,12 +526,12 @@ Module2400Name=Agenda
|
||||
Module2400Desc=Events/tasks and agenda management
|
||||
Module2500Name=Electronic Content Management
|
||||
Module2500Desc=Save and share documents
|
||||
Module2600Name=API services (Web services SOAP)
|
||||
Module2600Name=API/Web services (SOAP server)
|
||||
Module2600Desc=Enable the Dolibarr SOAP server providing API services
|
||||
Module2610Name=API services (Web services REST)
|
||||
Module2610Name=API/Web services (REST server)
|
||||
Module2610Desc=Enable the Dolibarr REST server providing API services
|
||||
Module2650Name=WebServices (client)
|
||||
Module2650Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Supplier orders supported only for the moment)
|
||||
Module2660Name=Call WebServices (SOAP client)
|
||||
Module2660Desc=Enable the Dolibarr web services client (Can be used to push data/requests to external servers. Supplier orders supported only for the moment)
|
||||
Module2700Name=Gravatar
|
||||
Module2700Desc=Use online Gravatar service (www.gravatar.com) to show photo of users/members (found with their emails). Need an internet access
|
||||
Module2800Desc=FTP Client
|
||||
@ -802,7 +804,7 @@ Permission59003=Read every user margin
|
||||
DictionaryCompanyType=Thirdparties type
|
||||
DictionaryCompanyJuridicalType=Juridical kinds of thirdparties
|
||||
DictionaryProspectLevel=Prospect potential level
|
||||
DictionaryCanton=State/Cantons
|
||||
DictionaryCanton=State/Province
|
||||
DictionaryRegion=Regions
|
||||
DictionaryCountry=Countries
|
||||
DictionaryCurrency=Currencies
|
||||
@ -1001,6 +1003,7 @@ SystemAreaForAdminOnly=This area is available for administrator users only. None
|
||||
CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this, click on "Modify" button at bottom of page)
|
||||
DisplayDesc=You can choose each parameter related to the Dolibarr look and feel here
|
||||
AvailableModules=Available modules
|
||||
DeprecatedModules=Deprecated modules
|
||||
ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
|
||||
SessionTimeOut=Time out for session
|
||||
SessionExplanation=This number guarantee that session will never expire before this delay, if the session cleaner is done by Internal PHP session cleaner (and nothing else). Internal PHP session cleaner does not guaranty that session will expire just after this delay. It will expire, after this delay, and when the session cleaner is ran, so every <b>%s/%s</b> access, but only during access made by other sessions.<br>Note: on some servers with an external session cleaning mechanism (cron under debian, ubuntu ...), the sessions can be destroyed after a period defined by the default <strong>session.gc_maxlifetime</strong>, no matter what the value entered here.
|
||||
@ -1689,3 +1692,4 @@ MailToSendSupplierRequestForQuotation=To send quotation request to supplier
|
||||
MailToSendSupplierOrder=To send supplier order
|
||||
MailToSendSupplierInvoice=To send supplier invoice
|
||||
MailToThirdparty=To send email from thirdparty page
|
||||
ByDefaultInList=Show by default on list view
|
||||
@ -64,6 +64,7 @@ UserTitle=Title
|
||||
Surname=Surname/Pseudo
|
||||
Address=Address
|
||||
State=State/Province
|
||||
StateShort=State
|
||||
Region=Region
|
||||
Country=Country
|
||||
CountryCode=Country code
|
||||
|
||||
@ -140,9 +140,9 @@ AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by third
|
||||
SeeReportInInputOutputMode=See report <b>%sIncomes-Expenses%s</b> said <b>cash accounting</b> for a calculation on actual payments made
|
||||
SeeReportInDueDebtMode=See report <b>%sClaims-Debts%s</b> said <b>commitment accounting</b> for a calculation on issued invoices
|
||||
RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included
|
||||
RulesResultDue=- It includes outstanding invoices, expenses and VAT whether they are paid or not. <br>- It is based on the validation date of invoices and VAT and on the due date for expenses.
|
||||
RulesResultInOut=- It includes the real payments made on invoices, expenses and VAT. <br>- It is based on the payment dates of the invoices, expenses and VAT.
|
||||
RulesCADue=- It includes the client's due invoices whether they are paid or not. <br>- It is based on the validation date of these invoices. <br>
|
||||
RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.<br>- It is based on the validation date of invoices and VAT and on the due date for expenses. For salaries defined with Salary module, the value date of payment is used.
|
||||
RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries. <br>- It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation.
|
||||
RulesCADue=- It includes the client's due invoices whether they are paid or not. <br>- It is based on the validation date of these invoices.<br>
|
||||
RulesCAIn=- It includes all the effective payments of invoices received from clients.<br>- It is based on the payment date of these invoices<br>
|
||||
DepositsAreNotIncluded=- Deposit invoices are nor included
|
||||
DepositsAreIncluded=- Deposit invoices are included
|
||||
|
||||
@ -140,8 +140,8 @@ AnnualByCompaniesInputOutputMode=Bilan des recettes et dépenses, détail par ti
|
||||
SeeReportInInputOutputMode=Cliquer sur <b>%sRecettes-Dépenses%s</b> dit <b>comptabilité de caisse</b> pour un calcul sur les paiements effectivement réalisés
|
||||
SeeReportInDueDebtMode=Cliquer sur <b>%sCréances-Dettes%s</b> dit <b>comptabilité d'engagement</b> pour un calcul sur les factures émises
|
||||
RulesAmountWithTaxIncluded=- Les montants affichés sont les montants taxe incluse
|
||||
RulesResultDue=- Il inclut les factures, charges et tva dues, qu'elles soient payées ou non.<br>- Il se base sur la date de validation pour les factures et la tva et sur la date d'échéance pour les charges.
|
||||
RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges et la TVA.<br>- Il se base sur la date de règlement de ces factures, charges et TVA.
|
||||
RulesResultDue=- Il inclut les factures, charges, tva dues, et dons qu'ils soient payées ou non.<br>- Il se base sur la date de validation pour les factures et la tva et sur la date d'échéance pour les charges. Pour les salaires saisis depuis le module Salaires, la date de valeur du paiement est utilisée.
|
||||
RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges, TVA et salaires.<br>- Il se base sur la date de règlement de ces factures, charges, TVA ou salaires. La date de don pour les dons.
|
||||
RulesCADue=- Il inclut les factures clients dues, qu'elles soient payées ou non.<br>- Il se base sur la date de validation de ces factures.<br>
|
||||
RulesCAIn=- Il inclut les règlements effectivement reçus des factures clients.<br>- Il se base sur la date de règlement de ces factures<br>
|
||||
DepositsAreNotIncluded=- Les factures d'acomptes ne sont pas incluses
|
||||
|
||||
@ -163,7 +163,10 @@ if (! defined('NOSCANPOSTFORINJECTION'))
|
||||
}
|
||||
|
||||
// This is to make Dolibarr working with Plesk
|
||||
if (! empty($_SERVER['DOCUMENT_ROOT'])) set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||
if (! empty($_SERVER['DOCUMENT_ROOT']) && substr($_SERVER['DOCUMENT_ROOT'], -6) !== 'htdocs')
|
||||
{
|
||||
set_include_path($_SERVER['DOCUMENT_ROOT'] . '/htdocs');
|
||||
}
|
||||
|
||||
// Include the conf.php and functions.lib.php
|
||||
require_once 'filefunc.inc.php';
|
||||
|
||||
@ -229,7 +229,7 @@ if ($mode == 'test' && $user->admin)
|
||||
$langs->load($driver);
|
||||
$printer = new $classname($db);
|
||||
//print '<pre>'.print_r($printer, true).'</pre>';
|
||||
if (count($printer->getlist_available_printers)) {
|
||||
if (count($printer->getlist_available_printers())) {
|
||||
print $printer->listAvailablePrinters();
|
||||
}
|
||||
else {
|
||||
|
||||
@ -38,6 +38,7 @@ $socid=GETPOST('socid','int');
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$id=GETPOST('id', 'int');
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -60,9 +61,11 @@ if (! GETPOST($htmlname) && ! GETPOST($idprod)) return;
|
||||
|
||||
// When used from jQuery, the search term is added as GET param "term".
|
||||
$searchkey=(GETPOST($idprod)?GETPOST($idprod):(GETPOST($htmlname)?GETPOST($htmlname):''));
|
||||
|
||||
$form = new FormProjets($db);
|
||||
$arrayresult=$form->select_projects_list($socid, '', $htmlname, '', 0, 0, array(), 0, 1, $searchkey);
|
||||
$arrayresult=$form->select_projects_list($socid, '', $htmlname, 0, 0, 1, 0, 0, 0, 1, $searchkey);
|
||||
|
||||
$db->close();
|
||||
|
||||
print json_encode($arrayresult);
|
||||
print json_encode($arrayresult);
|
||||
|
||||
|
||||
@ -281,7 +281,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="liste">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder);
|
||||
|
||||
@ -115,7 +115,6 @@ $tasksrole=($mine ? $taskstatic->getUserRolesForProjectsOrTasks(0,$user,$project
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="mode" value="'.GETPOST('mode').'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
// If the user can view users
|
||||
if ($user->rights->user->user->lire)
|
||||
@ -134,7 +133,7 @@ if ($user->rights->user->user->lire)
|
||||
}
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -142,6 +141,7 @@ if (! empty($moreforfilter))
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Project").'</td>';
|
||||
print '<td>'.$langs->trans("ProjectStatus").'</td>';
|
||||
|
||||
@ -55,12 +55,14 @@ $search_idprof5=trim(GETPOST('search_idprof5'));
|
||||
$search_idprof6=trim(GETPOST('search_idprof6'));
|
||||
$search_sale=trim(GETPOST("search_sale"));
|
||||
$search_categ=trim(GETPOST("search_categ"));
|
||||
$search_type=trim(GETPOST('search_type'));
|
||||
$search_country=GETPOST("search_country",'int');
|
||||
$search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
||||
$search_status=GETPOST("search_status",'int');
|
||||
|
||||
$optioncss=GETPOST('optioncss','alpha');
|
||||
$mode=GETPOST("mode");
|
||||
$modesearch=GETPOST("mode_search");
|
||||
$search_type=trim(GETPOST('search_type'));
|
||||
$search_country = GETPOST("search_country",'int');
|
||||
$search_type_thirdparty = GETPOST("search_type_thirdparty",'int');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
|
||||
$sortfield=GETPOST("sortfield",'alpha');
|
||||
$sortorder=GETPOST("sortorder",'alpha');
|
||||
@ -181,8 +183,11 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
||||
$search_type='';
|
||||
$search_country='';
|
||||
$search_type_thirdparty='';
|
||||
$search_status='';
|
||||
}
|
||||
|
||||
if ($search_status=='') $search_status=1; // always display active thirdparty first
|
||||
|
||||
if ($socname)
|
||||
{
|
||||
$search_nom=$socname;
|
||||
@ -190,7 +195,7 @@ if ($socname)
|
||||
|
||||
|
||||
/*
|
||||
* Mode Liste
|
||||
* Mode List
|
||||
*/
|
||||
/*
|
||||
REM: Regle sur droits "Voir tous les clients"
|
||||
@ -247,6 +252,7 @@ if ($search_idprof6) $sql .= " AND s.idprof6 LIKE '%".$db->escape($search_idpro
|
||||
if ($search_type > 0 && in_array($search_type,array('1,3','2,3'))) $sql .= " AND s.client IN (".$db->escape($search_type).")";
|
||||
if ($search_type > 0 && in_array($search_type,array('4'))) $sql .= " AND s.fournisseur = 1";
|
||||
if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0";
|
||||
if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status);
|
||||
if (!empty($conf->barcode->enabled) && $sbarcode) $sql.= " AND s.barcode LIKE '%".$db->escape($sbarcode)."%'";
|
||||
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
|
||||
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
|
||||
@ -272,18 +278,19 @@ if ($resql)
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$param = "&socname=".htmlspecialchars($socname);
|
||||
$param.= "&search_nom=".htmlspecialchars($search_nom);
|
||||
$param.= "&search_town=".htmlspecialchars($search_town);
|
||||
$param.= ($sbarcode?"&sbarcode=".htmlspecialchars($sbarcode):"");
|
||||
$param.= '&search_idprof1='.htmlspecialchars($search_idprof1);
|
||||
$param.= '&search_idprof2='.htmlspecialchars($search_idprof2);
|
||||
$param.= '&search_idprof3='.htmlspecialchars($search_idprof3);
|
||||
$param.= '&search_idprof4='.htmlspecialchars($search_idprof4);
|
||||
if ($search_country != '') $param.='&search_country='.htmlspecialchars($search_country);
|
||||
if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.htmlspecialchars($search_type_thirdparty);
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
|
||||
$param = "&socname=".urlencode($socname);
|
||||
$param.= "&search_nom=".urlencode($search_nom);
|
||||
$param.= "&search_town=".urlencode($search_town);
|
||||
$param.= ($sbarcode?"&sbarcode=".urlencode($sbarcode):"");
|
||||
$param.= '&search_idprof1='.urlencode($search_idprof1);
|
||||
$param.= '&search_idprof2='.urlencode($search_idprof2);
|
||||
$param.= '&search_idprof3='.urlencode($search_idprof3);
|
||||
$param.= '&search_idprof4='.urlencode($search_idprof4);
|
||||
if ($search_country != '') $param.='&search_country='.urlencode($search_country);
|
||||
if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.urlencode($search_type_thirdparty);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
if ($search_status != '') $params.='&search_status='.urlencode($search_status);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_companies');
|
||||
|
||||
// Show delete result message
|
||||
@ -334,7 +341,7 @@ if ($resql)
|
||||
*/
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -342,7 +349,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="liste">';
|
||||
|
||||
// Lines of titles
|
||||
print '<tr class="liste_titre">';
|
||||
@ -369,7 +376,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only;
|
||||
print '<input class="flat" type="text" name="search_nom" value="'.htmlspecialchars($search_nom).'">';
|
||||
print '<input class="flat" type="text" name="search_nom" size="8" value="'.htmlspecialchars($search_nom).'">';
|
||||
print '</td>';
|
||||
// Barcode
|
||||
if (! empty($conf->barcode->enabled))
|
||||
@ -380,11 +387,11 @@ if ($resql)
|
||||
}
|
||||
// Town
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="search_town" value="'.htmlspecialchars($search_town).'">';
|
||||
print '<input class="flat" size="8" type="text" name="search_town" value="'.htmlspecialchars($search_town).'">';
|
||||
print '</td>';
|
||||
//Country
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->select_country($search_country,'search_country');
|
||||
print $form->select_country($search_country,'search_country','',0,'maxwidth100');
|
||||
print '</td>';
|
||||
//Company type
|
||||
print '<td class="liste_titre" align="center">';
|
||||
@ -422,7 +429,9 @@ if ($resql)
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
// Status
|
||||
print '<td></td>';
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status);
|
||||
print '</td>';
|
||||
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
|
||||
@ -861,7 +861,7 @@ foreach($conf->modules as $val)
|
||||
$mainmenuusedarray=array_unique(explode(',',$mainmenuused));
|
||||
|
||||
$generic=1;
|
||||
$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices');
|
||||
$divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices');
|
||||
foreach($mainmenuusedarray as $val)
|
||||
{
|
||||
if (empty($val) || in_array($val,$divalreadydefined)) continue;
|
||||
@ -2014,11 +2014,11 @@ table.liste {
|
||||
width: 100%;
|
||||
|
||||
border-collapse: collapse;
|
||||
border-top-color: #FEFEFE;
|
||||
|
||||
/* border-top-color: #FEFEFE;
|
||||
border-top-width: 1px;
|
||||
border-top-color: #CCC;
|
||||
border-top-style: solid;
|
||||
*/
|
||||
|
||||
border-right-width: 1px;
|
||||
border-right-color: #CCC;
|
||||
|
||||
@ -898,7 +898,7 @@ foreach($conf->modules as $val)
|
||||
$mainmenuusedarray=array_unique(explode(',',$mainmenuused));
|
||||
|
||||
$generic=1;
|
||||
$divalreadydefined=array('home','companies','products','commercial','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices');
|
||||
$divalreadydefined=array('home','companies','products','commercial','externalsite','accountancy','project','tools','members','agenda','holiday','bookmark','cashdesk','ecm','geoipmaxmind','gravatar','clicktodial','paypal','webservices');
|
||||
foreach($mainmenuusedarray as $val)
|
||||
{
|
||||
if (empty($val) || in_array($val,$divalreadydefined)) continue;
|
||||
|
||||
@ -1 +0,0 @@
|
||||
../raven/raven/bin/raven
|
||||
Loading…
Reference in New Issue
Block a user