Merge branch 'develop' into develop_origin
This commit is contained in:
commit
309535c260
@ -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.
|
||||
|
||||
|
||||
@ -13,8 +13,9 @@ make a Dolibarr upgrade.
|
||||
|
||||
WARNING: Following changes may create regression for some external modules, but were necessary to make
|
||||
Dolibarr better:
|
||||
- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use MAIN_OVERWRITE_TRANS_xx_YY instead.
|
||||
|
||||
- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use table llx_overwrite_trans instead.
|
||||
- Trigger LINECONTRACT_INSERT has been renamed into LINECONTRACT_CREATE to match common denomination.
|
||||
|
||||
|
||||
***** ChangeLog for 3.8 compared to 3.7.* *****
|
||||
For users:
|
||||
|
||||
2058
dev/cliparts/commons.svg
Normal file
2058
dev/cliparts/commons.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 65 KiB |
@ -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">';
|
||||
|
||||
@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||
@ -120,6 +121,7 @@ $paymentsupplierstatic = new PaiementFourn($db);
|
||||
$societestatic = new Societe($db);
|
||||
$userstatic = new User($db);
|
||||
$chargestatic = new ChargeSociales($db);
|
||||
$paymentdonstatic = new PaymentDonation($db);
|
||||
$paymentvatstatic = new TVA($db);
|
||||
$paymentsalstatic = new PaymentSalary($db);
|
||||
|
||||
@ -133,7 +135,8 @@ if ($result) {
|
||||
$cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"));
|
||||
$accountancy_account_salary = (! empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) ? $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT : $langs->trans("CodeNotDef"));
|
||||
$accountancy_account_pay_vat = (! empty($conf->global->ACCOUNTING_VAT_PAY_ACCOUNT) ? $conf->global->ACCOUNTING_VAT_PAY_ACCOUNT : $langs->trans("CodeNotDef"));
|
||||
|
||||
$accountancy_account_pay_donation = (! empty($conf->global->DONATION_ACCOUNTINGACCOUNT) ? $conf->global->DONATION_ACCOUNTINGACCOUNT : $langs->trans("CodeNotDef"));
|
||||
|
||||
$tabpay = array ();
|
||||
$tabbq = array ();
|
||||
$tabtp = array ();
|
||||
@ -174,95 +177,100 @@ if ($result) {
|
||||
// get_url may return -1 which is not traversable
|
||||
if (is_array($links))
|
||||
{
|
||||
|
||||
foreach ( $links as $key => $val )
|
||||
{
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
foreach ( $links as $key => $val )
|
||||
{
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
|
||||
if ($links[$key]['type'] == 'payment')
|
||||
{
|
||||
$paymentstatic->id = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_supplier')
|
||||
{
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||
}
|
||||
else if ($links[$key]['type'] == 'company')
|
||||
{
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'user')
|
||||
{
|
||||
$userstatic->id = $links[$key]['url_id'];
|
||||
$userstatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
|
||||
// $tabtp[$obj->rowid][$compta_user] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
}
|
||||
else
|
||||
if ($links[$key]['type'] == 'payment')
|
||||
{
|
||||
$chargestatic->lib = $links[$key]['label'];
|
||||
$paymentstatic->id = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentstatic->getNomUrl(2);
|
||||
}
|
||||
$chargestatic->ref = $chargestatic->lib;
|
||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||
|
||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
||||
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
|
||||
|
||||
|
||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid)
|
||||
else if ($links[$key]['type'] == 'payment_supplier')
|
||||
{
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||
$paymentsupplierstatic->id = $links[$key]['url_id'];
|
||||
$paymentsupplierstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsupplierstatic->getNomUrl(2);
|
||||
}
|
||||
else if ($links[$key]['type'] == 'company')
|
||||
{
|
||||
$societestatic->id = $links[$key]['url_id'];
|
||||
$societestatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $societestatic->getNomUrl(1, '', 30);
|
||||
$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'user')
|
||||
{
|
||||
$userstatic->id = $links[$key]['url_id'];
|
||||
$userstatic->name = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["soclib"] = $userstatic->getNomUrl(1, '', 30);
|
||||
// $tabtp[$obj->rowid][$compta_user] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'sc')
|
||||
{
|
||||
$chargestatic->id = $links[$key]['url_id'];
|
||||
$chargestatic->ref = $links[$key]['url_id'];
|
||||
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $chargestatic->getNomUrl(2);
|
||||
if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) {
|
||||
if ($reg[1] == 'socialcontribution')
|
||||
$reg[1] = 'SocialContribution';
|
||||
$chargestatic->lib = $langs->trans($reg[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$chargestatic->lib = $links[$key]['label'];
|
||||
}
|
||||
$chargestatic->ref = $chargestatic->lib;
|
||||
$tabpay[$obj->rowid]["soclib"] = $chargestatic->getNomUrl(1, 30);
|
||||
|
||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||
$sqlmid .= " FROM " . MAIN_DB_PREFIX . "c_chargesociales cchgsoc ";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN " . MAIN_DB_PREFIX . "bank_url as bkurl ON bkurl.url_id=paycharg.rowid";
|
||||
$sqlmid .= " WHERE bkurl.fk_bank=" . $obj->rowid;
|
||||
|
||||
|
||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=" . $sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
if ($resultmid)
|
||||
{
|
||||
$objmid = $db->fetch_object($resultmid);
|
||||
$tabtp[$obj->rowid][$objmid->accountancy_code] += $obj->amount;
|
||||
}
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_donation')
|
||||
{
|
||||
$paymentdonstatic->id = $links[$key]['url_id'];
|
||||
$paymentdonstatic->fk_donation = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentDonation");
|
||||
$tabtp[$obj->rowid][$accountancy_account_pay_donation] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_vat')
|
||||
{
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
|
||||
$tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_salary')
|
||||
{
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$paymentsalstatic->label = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'banktransfert')
|
||||
{
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_vat')
|
||||
{
|
||||
$paymentvatstatic->id = $links[$key]['url_id'];
|
||||
$paymentvatstatic->ref = $links[$key]['url_id'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("PaymentVat");
|
||||
$tabtp[$obj->rowid][$accountancy_account_pay_vat] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'payment_salary')
|
||||
{
|
||||
$paymentsalstatic->id = $links[$key]['url_id'];
|
||||
$paymentsalstatic->ref = $links[$key]['url_id'];
|
||||
$paymentsalstatic->label = $links[$key]['label'];
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentsalstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$accountancy_account_salary] += $obj->amount;
|
||||
}
|
||||
else if ($links[$key]['type'] == 'banktransfert')
|
||||
{
|
||||
$tabpay[$obj->rowid]["lib"] .= ' ' . $paymentvatstatic->getNomUrl(2);
|
||||
$tabtp[$obj->rowid][$cpttva] += $obj->amount;
|
||||
}
|
||||
/*else {
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||
|
||||
@ -195,13 +195,14 @@ if ($resql)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
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 +210,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
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);
|
||||
|
||||
@ -116,7 +116,7 @@ else
|
||||
}
|
||||
|
||||
// Print array
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$langs->trans("Nature").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NbOfMembers").'</td>';
|
||||
|
||||
@ -282,7 +282,7 @@ if (count($arrayjs) && $mode == 'memberbycountry')
|
||||
if ($mode)
|
||||
{
|
||||
// Print array / Affiche le tableau
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="center">'.$label.'</td>';
|
||||
if ($label2) print '<td align="center">'.$label2.'</td>';
|
||||
|
||||
@ -167,8 +167,8 @@ print '<br><br>';
|
||||
$data = $stats->getAllByYear();
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr height="24">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NbOfSubscriptions").'</td>';
|
||||
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||
@ -176,14 +176,15 @@ print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
$var=false;
|
||||
foreach ($data as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
print $avg;
|
||||
while ($oldyear > $year+1)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center">';
|
||||
print '<a href="month.php?year='.$oldyear.'&mode='.$mode.'">';
|
||||
print $oldyear;
|
||||
@ -194,7 +195,8 @@ foreach ($data as $val)
|
||||
print '<td align="right">0</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center">';
|
||||
//print '<a href="month.php?year='.$year.'">';
|
||||
print $year;
|
||||
|
||||
@ -168,7 +168,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
|
||||
print load_fiche_titre($langs->trans("MembersTypes"));
|
||||
|
||||
dol_fiche_head('');
|
||||
//dol_fiche_head('');
|
||||
|
||||
$sql = "SELECT d.rowid, d.libelle, d.cotisation, d.vote";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
|
||||
@ -211,7 +211,7 @@ if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
//dol_fiche_end();
|
||||
|
||||
/*
|
||||
* Hotbar
|
||||
|
||||
@ -380,7 +380,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('/thumbs/'.$mysoc->logo_mini).'">';
|
||||
}
|
||||
} else {
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.jpg">';
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
print '</td></tr>';
|
||||
@ -769,7 +769,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.jpg">';
|
||||
print '<img height="30" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -73,5 +73,9 @@ else
|
||||
dol_print_error($db,'Error');
|
||||
$found = 'Error';
|
||||
}
|
||||
//Greek to Latin
|
||||
$greek = array('α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','ά','έ','ή','ί','ό','ύ','ώ','ϊ','ΐ','Ά','Έ','Ή','Ί','Ό','Ύ','Ώ','Ϊ');
|
||||
|
||||
echo $found;
|
||||
$latin = array('a','b','g','d','e','z','h','th','i','k','l','m','n','ks','o','p','r','s','s','t','u','f','ch','ps','w','A','B','G','D','E','Z','H','TH','I','K','L','M','N','KS','O','P','R','S','T','U','F','CH','PS','W','a','e','h','i','o','u','w','i','i','A','E','H','I','O','U','W','I');
|
||||
|
||||
print str_replace($greek, $latin, $found);
|
||||
|
||||
@ -112,6 +112,34 @@ $strMaxRetry = "2";
|
||||
|
||||
llxHeader();
|
||||
|
||||
$sql = "SELECT s.nom as name FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid";
|
||||
$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")";
|
||||
$sql.= " AND (s.phone='".$db->escape($called)."'";
|
||||
$sql.= " OR sp.phone='".$db->escape($called)."'";
|
||||
$sql.= " OR sp.phone_perso='".$db->escape($called)."'";
|
||||
$sql.= " OR sp.phone_mobile='".$db->escape($called)."')";
|
||||
$sql.= $db->plimit(1);
|
||||
|
||||
dol_syslog('click to dial search information with phone '.$called, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$found = $obj->name;
|
||||
} else {
|
||||
$found = $notfound;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db,'Error');
|
||||
$found = 'Error';
|
||||
}
|
||||
|
||||
$number=strtolower($called);
|
||||
$pos=strpos($number,"local");
|
||||
if (! empty($number))
|
||||
@ -120,7 +148,7 @@ if (! empty($number))
|
||||
{
|
||||
$errno=0;
|
||||
$errstr=0;
|
||||
$strCallerId = "Dolibarr <".strtolower($caller).">";
|
||||
$strCallerId = "Dolibarr call $found <".strtolower($number).">";
|
||||
$oSocket = @fsockopen($strHost, $port, $errno, $errstr, 10);
|
||||
if (!$oSocket)
|
||||
{
|
||||
|
||||
@ -220,7 +220,7 @@ class ActionComm extends CommonObject
|
||||
$this->userassigned[$tmpid]=array('id'=>$tmpid);
|
||||
}
|
||||
|
||||
if (is_object($this->contact) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated
|
||||
if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated
|
||||
|
||||
|
||||
$userownerid=$this->userownerid;
|
||||
|
||||
@ -242,7 +242,6 @@ if ($result)
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
@ -250,25 +249,32 @@ if ($result)
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$langs->load("commercial");
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||
$moreforfilter.=$form->select_dolusers($search_user,'search_user',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="10">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
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
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('AskPriceSupplierDate'),$_SERVER["PHP_SELF"],'p.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
|
||||
@ -218,17 +218,15 @@ if ($id > 0)
|
||||
dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
|
||||
print '</td></tr>';
|
||||
|
||||
// Alias name (commercial, trademark or alias name)
|
||||
print '<tr><td>'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
|
||||
print '<tr><td class="titelfield">'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
@ -264,39 +262,6 @@ if ($id > 0)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Address
|
||||
print '<tr><td>'.$langs->trans('Address').'</td><td colspan="3">';
|
||||
dol_print_address($object->address,'gmap','thirdparty',$object->id);
|
||||
print "</td></tr>";
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td class="nowrap">'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td>';
|
||||
print '<td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town."</td>";
|
||||
print '</tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
if (! empty($object->country_code))
|
||||
{
|
||||
//$img=picto_from_langcode($object->country_code);
|
||||
$img='';
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// EMail
|
||||
print '<td>'.$langs->trans('EMail').'</td><td colspan="3">'.dol_print_email($object->email,0,$object->id,'AC_EMAIL').'</td></tr>';
|
||||
|
||||
// Web
|
||||
print '<tr><td>'.$langs->trans("Web").'</td><td colspan="3">'.dol_print_url($object->url,'_blank').'</td></tr>';
|
||||
|
||||
// Phone
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
|
||||
|
||||
// Fax
|
||||
print '<td>'.$langs->trans('Fax').'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
|
||||
@ -172,12 +172,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("ProposalsDraft").'</td></tr>';
|
||||
|
||||
$total = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("ProposalsDraft").' <span class="badge">'.$num.'</span></td></tr>';
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
$i = 0;
|
||||
@ -246,12 +247,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("DraftOrders").'</td></tr>';
|
||||
|
||||
$total = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("DraftOrders").' <span class="badge">'.$num.'</span></td></tr>';
|
||||
|
||||
if ($num)
|
||||
{
|
||||
$i = 0;
|
||||
@ -329,7 +331,11 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).'</td>';
|
||||
print '<td colspan="2">';
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects",$max);
|
||||
else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max);
|
||||
else print $langs->trans("BoxTitleLastModifiedCustomers",$max);
|
||||
print '</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '</tr>';
|
||||
if ($num)
|
||||
|
||||
@ -193,19 +193,22 @@ if ($result)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('SalesRepresentatives'). ': ';
|
||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
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 +216,7 @@ if ($result)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">'."\n";
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
@ -246,7 +249,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">';
|
||||
|
||||
@ -265,7 +265,6 @@ if ($result)
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
$moreforfilter='';
|
||||
|
||||
@ -298,12 +297,13 @@ if ($result)
|
||||
}
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="10">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
|
||||
@ -234,7 +234,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
// Show filter box
|
||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||
@ -262,8 +262,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<br><br>';
|
||||
//}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr height="24">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NbOfProposals").'</td>';
|
||||
print '<td align="center">%</td>';
|
||||
@ -274,13 +274,15 @@ print '<td align="center">%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
$var=true;
|
||||
foreach ($data as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
while (! empty($year) && $oldyear > $year+1)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right"></td>';
|
||||
@ -290,7 +292,7 @@ foreach ($data as $val)
|
||||
print '<td align="right"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr height="24">';
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||
|
||||
@ -359,19 +359,22 @@ if ($resql)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('SalesRepresentatives'). ': ';
|
||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
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 +382,13 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
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 +430,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
|
||||
|
||||
@ -52,9 +52,9 @@ if (GETPOST('cancel') && ! empty($backtopage))
|
||||
|
||||
if (GETPOST("action") == 'setremise')
|
||||
{
|
||||
$soc = New Societe($db);
|
||||
$soc->fetch($_GET["id"]);
|
||||
$result=$soc->set_remise_client($_POST["remise"],$_POST["note"],$user);
|
||||
$object = new Societe($db);
|
||||
$object->fetch($_GET["id"]);
|
||||
$result=$object->set_remise_client($_POST["remise"],$_POST["note"],$user);
|
||||
|
||||
if ($result > 0)
|
||||
{
|
||||
@ -71,7 +71,7 @@ if (GETPOST("action") == 'setremise')
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($soc->error, 'errors');
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,51 +93,50 @@ llxHeader();
|
||||
if ($socid > 0)
|
||||
{
|
||||
// On recupere les donnees societes par l'objet
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->id=$socid;
|
||||
$objsoc->fetch($socid);
|
||||
$object = new Societe($db);
|
||||
$object->fetch($socid);
|
||||
|
||||
$head = societe_prepare_head($objsoc);
|
||||
$head = societe_prepare_head($object);
|
||||
|
||||
|
||||
|
||||
print '<form method="POST" action="remise.php?id='.$objsoc->id.'">';
|
||||
print '<form method="POST" action="remise.php?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setremise">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Name
|
||||
print '<tr><td colspan="2" width="25%">'.$langs->trans('Name').'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showrefnav($objsoc,'id','',1,'rowid','nom');
|
||||
print '</td></tr>';
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Remise
|
||||
print '<tr><td colspan="2" width="25%">';
|
||||
print $langs->trans("CustomerRelativeDiscount").'</td><td colspan="2">'.price2num($objsoc->remise_percent)."%</td></tr>";
|
||||
print '<tr><td class="titlefield">';
|
||||
print $langs->trans("CustomerRelativeDiscount").'</td><td>'.price2num($object->remise_percent)."%</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewRelativeDiscount"),'','');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Nouvelle valeur
|
||||
print '<tr><td colspan="2">';
|
||||
print $langs->trans("NewValue").'</td><td colspan="2"><input type="text" size="5" name="remise" value="'.($_POST["remise"]?$_POST["remise"]:'').'">%</td></tr>';
|
||||
print '<tr><td class="titlefield">';
|
||||
print $langs->trans("NewValue").'</td><td><input type="text" size="5" name="remise" value="'.($_POST["remise"]?$_POST["remise"]:'').'">%</td></tr>';
|
||||
|
||||
// Motif/Note
|
||||
print '<tr><td colspan="2" width="25%">';
|
||||
print $langs->trans("NoteReason").'</td><td colspan="2"><input type="text" size="60" name="note" value="'.$_POST["note"].'"></td></tr>';
|
||||
print '<tr><td>';
|
||||
print $langs->trans("NoteReason").'</td><td><input type="text" size="60" name="note" value="'.$_POST["note"].'"></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
@ -160,7 +159,7 @@ if ($socid > 0)
|
||||
$sql = "SELECT rc.rowid, rc.remise_client as remise_percent, rc.note, rc.datec as dc,";
|
||||
$sql.= " u.login, u.rowid as user_id";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql.= " WHERE rc.fk_soc =". $object->id;
|
||||
$sql.= " AND u.rowid = rc.fk_user_author";
|
||||
$sql.= " ORDER BY rc.datec DESC";
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ $action=GETPOST('action','alpha');
|
||||
$backtopage=GETPOST('backtopage','alpha');
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('id','int');
|
||||
$socid = GETPOST('id','int')?GETPOST('id','int'):GETPOST('socid','int');
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$socid = $user->societe_id;
|
||||
@ -212,36 +212,34 @@ llxHeader('',$langs->trans("GlobalDiscount"));
|
||||
if ($socid > 0)
|
||||
{
|
||||
// On recupere les donnees societes par l'objet
|
||||
$objsoc = new Societe($db);
|
||||
$objsoc->id=$socid;
|
||||
$objsoc->fetch($socid);
|
||||
$object = new Societe($db);
|
||||
$object->fetch($socid);
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
$head = societe_prepare_head($objsoc);
|
||||
$head = societe_prepare_head($object);
|
||||
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$objsoc->id.'">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setremise">';
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
|
||||
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Name
|
||||
print '<tr><td width="38%">'.$langs->trans('Name').'</td>';
|
||||
print '<td>';
|
||||
print $form->showrefnav($objsoc,'id','',1,'rowid','nom');
|
||||
print '</td></tr>';
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Calcul avoirs en cours
|
||||
$remise_all=$remise_user=0;
|
||||
$sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql.= " WHERE rc.fk_soc =". $object->id;
|
||||
$sql.= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)";
|
||||
$sql.= " GROUP BY rc.fk_user";
|
||||
$resql=$db->query($sql);
|
||||
@ -256,7 +254,7 @@ if ($socid > 0)
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '<tr><td width="38%">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'</td>';
|
||||
print '<td>'.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("CustomerAbsoluteDiscountMy").'</td>';
|
||||
@ -271,13 +269,15 @@ if ($socid > 0)
|
||||
print '<span class="hideonsmartphone"> '.$langs->trans("Currency".$conf->currency).'</span></td></tr>';
|
||||
print '<tr><td width="38%">'.$langs->trans("VAT").'</td>';
|
||||
print '<td>';
|
||||
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$objsoc);
|
||||
print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object);
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("NoteReason").'</td>';
|
||||
print '<td><input type="text" size="60" name="desc" value="'.$_POST["desc"].'"></td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
@ -296,7 +296,7 @@ if ($socid > 0)
|
||||
|
||||
if ($_GET['action'] == 'remove')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -309,7 +309,7 @@ if ($socid > 0)
|
||||
$sql.= " fa.facnumber as ref, fa.type as type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid";
|
||||
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql.= " WHERE rc.fk_soc =". $object->id;
|
||||
$sql.= " AND u.rowid = rc.fk_user";
|
||||
$sql.= " AND (rc.fk_facture_line IS NULL AND rc.fk_facture IS NULL)";
|
||||
$sql.= " ORDER BY rc.datec DESC";
|
||||
@ -375,9 +375,9 @@ if ($socid > 0)
|
||||
if ($user->rights->societe->creer || $user->rights->facture->creer)
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&action=split&remid='.$obj->rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').'</a>';
|
||||
print ' ';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&action=remove&remid='.$obj->rowid.'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
@ -403,7 +403,7 @@ if ($socid > 0)
|
||||
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
);
|
||||
$langs->load("dict");
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -429,7 +429,7 @@ if ($socid > 0)
|
||||
$sql.= " , ".MAIN_DB_PREFIX."facturedet as fc";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid";
|
||||
$sql.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql.= " WHERE rc.fk_soc =". $object->id;
|
||||
$sql.= " AND rc.fk_facture_line = fc.rowid";
|
||||
$sql.= " AND fc.fk_facture = f.rowid";
|
||||
$sql.= " AND rc.fk_user = u.rowid";
|
||||
@ -446,7 +446,7 @@ if ($socid > 0)
|
||||
$sql2.= " , ".MAIN_DB_PREFIX."user as u";
|
||||
$sql2.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
|
||||
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid";
|
||||
$sql2.= " WHERE rc.fk_soc =". $objsoc->id;
|
||||
$sql2.= " WHERE rc.fk_soc =". $object->id;
|
||||
$sql2.= " AND rc.fk_facture = f.rowid";
|
||||
$sql2.= " AND rc.fk_user = u.rowid";
|
||||
|
||||
|
||||
@ -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'
|
||||
@ -275,15 +273,15 @@ if ($resql)
|
||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300');
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
// If the user can view other users
|
||||
if ($user->rights->user->user->lire)
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
// If the user can view categories or products
|
||||
if ($conf->categorie->enabled && $user->rights->produit->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
@ -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,12 +301,13 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
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);
|
||||
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)) print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
@ -331,11 +330,15 @@ if ($resql)
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="orderday" value="'.$orderday.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="ordermonth" value="'.$ordermonth.'">';
|
||||
$formother->select_year($orderyear?$orderyear:-1,'orderyear',1, 20, 5);
|
||||
print '</td><td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="deliveryday" value="'.$deliveryday.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="deliverymonth" value="'.$deliverymonth.'">';
|
||||
$formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5);
|
||||
print '</td>';
|
||||
if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="deliveryday" value="'.$deliveryday.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="deliverymonth" value="'.$deliverymonth.'">';
|
||||
$formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="6" name="search_total_ht" value="'.$search_total_ht.'">';
|
||||
print '</td>';
|
||||
|
||||
@ -250,7 +250,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
// Show filter box
|
||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td align="left">'.$langs->trans("ThirdParty").'</td><td align="left">';
|
||||
@ -275,8 +275,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<br><br>';
|
||||
//}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr height="24">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NbOfOrders").'</td>';
|
||||
print '<td align="center">%</td>';
|
||||
@ -287,13 +287,15 @@ print '<td align="center">%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
$var=true;
|
||||
foreach ($data as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
while (! empty($year) && $oldyear > $year+1)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
|
||||
print '<td align="right">0</td>';
|
||||
@ -305,7 +307,8 @@ foreach ($data as $val)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||
|
||||
@ -952,7 +952,7 @@ if ($id > 0 || ! empty($ref))
|
||||
if ($sep > 0) print ' '; // If we had at least one line in future
|
||||
else print $langs->trans("CurrentBalance");
|
||||
print ' '.$object->currency_code.'</td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($solde, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
|
||||
print '<td align="right" class="nowrap"><b>'.price($total, 0, $langs, 0, 0, -1, $object->currency_code).'</b></td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -2973,16 +2973,16 @@ else if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<td rowspan="' . $nbrows . '" colspan="2" valign="top">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%">';
|
||||
print '<table class="nobordernopadding paymenttable" width="100%">';
|
||||
|
||||
// List of payments already done
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '</td>';
|
||||
print '<td>' . $langs->trans('Type') . '</td>';
|
||||
print '<td class="liste_titre">' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '</td>';
|
||||
print '<td class="liste_titre">' . $langs->trans('Type') . '</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
print '<td align="right">' . $langs->trans('BankAccount') . '</td>';
|
||||
print '<td align="right">' . $langs->trans('Amount') . '</td>';
|
||||
print '<td width="18"> </td>';
|
||||
print '<td class="liste_titre" align="right">' . $langs->trans('BankAccount') . '</td>';
|
||||
print '<td class="liste_titre" align="right">' . $langs->trans('Amount') . '</td>';
|
||||
print '<td class="liste_titre" width="18"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
$var = true;
|
||||
@ -3033,7 +3033,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$i ++;
|
||||
}
|
||||
} else {
|
||||
print '<tr ' . $bc [$var] . '><td colspan="' . $nbcols . '">' . $langs->trans("None") . '</td><td></td><td></td></tr>';
|
||||
print '<tr ' . $bc[false] . '><td colspan="' . $nbcols . '">' . $langs->trans("None") . '</td><td></td><td></td></tr>';
|
||||
}
|
||||
// }
|
||||
$db->free($result);
|
||||
|
||||
@ -275,7 +275,6 @@ if ($resql)
|
||||
|
||||
$i = 0;
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
// If the user can view prospects other than his'
|
||||
$moreforfilter='';
|
||||
@ -308,12 +307,16 @@ if ($resql)
|
||||
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="11">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
|
||||
@ -49,7 +49,7 @@ $builddoc_generatebutton=GETPOST('builddoc_generatebutton');
|
||||
$month = GETPOST("month","int");
|
||||
$year = GETPOST("year","int");
|
||||
$filter = GETPOST("filtre");
|
||||
if (GETPOST('button_search'))
|
||||
if (GETPOST('button_search') || GETPOST('button_search.x') || GETPOST('button_search_x'))
|
||||
{
|
||||
$filter=GETPOST('filtre',2);
|
||||
//if ($filter != 'payed:0') $option='';
|
||||
@ -616,32 +616,38 @@ if ($resql)
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
// If the user can view prospects other than his'
|
||||
$moreforfilter='';
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$langs->load("commercial");
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||
$moreforfilter.=$form->select_dolusers($search_user,'search_user',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="13">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder);
|
||||
|
||||
@ -234,7 +234,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
// Show filter box
|
||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
@ -259,8 +259,8 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<br><br>';
|
||||
//}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr height="24">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NumberOfBills").'</td>';
|
||||
print '<td align="center">%</td>';
|
||||
@ -271,13 +271,15 @@ print '<td align="center">%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
$var=true;
|
||||
foreach ($data as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
while ($year && $oldyear > $year+1)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
print '<td align="right">0</td>';
|
||||
print '<td align="right"></td>';
|
||||
@ -287,7 +289,8 @@ foreach ($data as $val)
|
||||
print '<td align="right"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
print '<td align="right" style="'.(($val['nb_diff'] >= 0) ? 'color: green;':'color: red;').'">'.round($val['nb_diff']).'</td>';
|
||||
|
||||
@ -117,7 +117,7 @@ if ($resql)
|
||||
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num);
|
||||
|
||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
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"],"bc.number","",$params,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"dp","",$params,'align="center"',$sortfield,$sortorder);
|
||||
@ -148,42 +148,52 @@ if ($resql)
|
||||
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></tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Num ref cheque
|
||||
print '<td width="80">';
|
||||
$checkdepositstatic->id=$objp->rowid;
|
||||
$checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid);
|
||||
$checkdepositstatic->statut=$objp->statut;
|
||||
print $checkdepositstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'day').'</td>'; // TODO Use date hour
|
||||
|
||||
// Bank
|
||||
print '<td>';
|
||||
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Number of cheques
|
||||
print '<td align="right">'.$objp->nbcheque.'</td>';
|
||||
|
||||
// Amount
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
|
||||
// Statut
|
||||
print '<td align="right">';
|
||||
print $checkdepositstatic->LibStatut($objp->statut,5);
|
||||
print "</td></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
if ($num > 0)
|
||||
{
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Num ref cheque
|
||||
print '<td width="80">';
|
||||
$checkdepositstatic->id=$objp->rowid;
|
||||
$checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid);
|
||||
$checkdepositstatic->statut=$objp->statut;
|
||||
print $checkdepositstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dp),'day').'</td>'; // TODO Use date hour
|
||||
|
||||
// Bank
|
||||
print '<td>';
|
||||
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Number of cheques
|
||||
print '<td align="right">'.$objp->nbcheque.'</td>';
|
||||
|
||||
// Amount
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
|
||||
// Statut
|
||||
print '<td align="right">';
|
||||
print $checkdepositstatic->LibStatut($objp->statut,5);
|
||||
print "</td></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="6">'.$langs->trans("None")."</td>";
|
||||
print '</tr>';
|
||||
}
|
||||
print "</table>";
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -192,6 +202,6 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -906,7 +906,7 @@ class Paiement extends CommonObject
|
||||
|
||||
if ($withpicto) $result.=($link.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
if ($withpicto != 2) $result.=$link.$this->ref.$linkend;
|
||||
if ($withpicto != 2) $result.=$link.($this->ref?$this->ref:$this->id).$linkend;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -305,6 +305,5 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sortorder
|
||||
);
|
||||
} else {
|
||||
print '<td colspan="1"></td>';
|
||||
print_liste_field_titre('');
|
||||
}
|
||||
print_liste_field_titre(
|
||||
$langs->trans("AmountTTC"),
|
||||
|
||||
@ -350,7 +350,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
$sortorder
|
||||
);
|
||||
} else {
|
||||
print '<td colspan="1"></td>';
|
||||
print_liste_field_titre('');
|
||||
}
|
||||
print_liste_field_titre(
|
||||
$langs->trans("AmountTTC"),
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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
|
||||
@ -773,11 +773,14 @@ else
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td>'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $object->ref;
|
||||
print '</td></tr>';
|
||||
|
||||
// Ref/ID
|
||||
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ID").'</td><td colspan="3">';
|
||||
print $object->ref;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Lastname
|
||||
print '<tr><td width="20%" class="fieldrequired"><label for="lastname">'.$langs->trans("Lastname").' / '.$langs->trans("Label").'</label></td>';
|
||||
print '<td width="30%"><input name="lastname" id="lastname" type="text" size="20" maxlength="80" value="'.(isset($_POST["lastname"])?$_POST["lastname"]:$object->lastname).'" autofocus="autofocus"></td>';
|
||||
@ -1040,23 +1043,32 @@ else
|
||||
|
||||
}
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
/*print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object, 'id', $linkback);
|
||||
print '</td></tr>';
|
||||
|
||||
// Name
|
||||
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>';
|
||||
|
||||
*/
|
||||
|
||||
// Company
|
||||
if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if ($object->socid > 0)
|
||||
{
|
||||
$objsoc->fetch($object->socid);
|
||||
@ -1070,6 +1082,7 @@ else
|
||||
}
|
||||
|
||||
// Photo
|
||||
/*
|
||||
if ($object->photo)
|
||||
{
|
||||
print '<td rowspan="6" style="text-align: center;" width="25%">';
|
||||
@ -1080,18 +1093,20 @@ else
|
||||
print ' ';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
print '</tr>';
|
||||
|
||||
// Civility
|
||||
print '<tr><td width="15%">'.$langs->trans("UserTitle").'</td><td colspan="2">';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||
print $object->getCivilityLabel();
|
||||
print '</td></tr>';
|
||||
|
||||
// Role
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td colspan="2">'.$object->poste.'</td>';
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td>'.$object->poste.'</td></tr>';
|
||||
|
||||
// Address
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="2">';
|
||||
dol_print_address($object->address,'gmap','contact',$object->id);
|
||||
print '</td></tr>';
|
||||
@ -1112,68 +1127,72 @@ else
|
||||
// State
|
||||
if (empty($conf->global->SOCIETE_DISABLE_STATE))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="2">'.$object->state.'</td>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td>'.$object->state.'</td></tr>';
|
||||
}*/
|
||||
|
||||
// Phone
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("PhonePro").'</td><td>'.dol_print_phone($object->phone_pro,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td>';
|
||||
print '<td>'.$langs->trans("PhonePerso").'</td><td>'.dol_print_phone($object->phone_perso,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("PhoneMobile").'</td><td>'.dol_print_phone($object->phone_mobile,$object->country_code,$object->id,$object->socid,'AC_TEL').'</td>';
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($object->fax,$object->country_code,$object->id,$object->socid,'AC_FAX').'</td></tr>';
|
||||
|
||||
*/
|
||||
|
||||
// Email
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td>'.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'</td>';
|
||||
//print '<tr><td>'.$langs->trans("EMail").'</td><td>'.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'</td></tr>';
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
$langs->load("mails");
|
||||
print '<td class="nowrap">'.$langs->trans("NbOfEMailingsSend").'</td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td>';
|
||||
print '<tr><td class="nowrap">'.$langs->trans("NbOfEMailingsSend").'</td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php?filteremail='.urlencode($object->email).'">'.$object->getNbOfEMailings().'</a></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2"> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Instant message and no email
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td>'.$object->jabberid.'</td>';
|
||||
print '<tr><td>'.$langs->trans("IM").'</td><td>'.$object->jabberid.'</td></tr>';
|
||||
if (!empty($conf->mailing->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td>';
|
||||
print '<tr><td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td colspan="2"> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td colspan="3">'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Skype").'</td><td>'.dol_print_skype($object->skype,0,$object->fk_soc,1).'</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td colspan="3">';
|
||||
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td>';
|
||||
print $object->LibPubPriv($object->priv);
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Public
|
||||
print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td><td colspan="3">';
|
||||
/*
|
||||
print '<tr><td class="tdtop">'.$langs->trans("NotePublic").'</td><td>';
|
||||
print nl2br($object->note_public);
|
||||
print '</td></tr>';
|
||||
|
||||
// Note Private
|
||||
print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td><td colspan="3">';
|
||||
print '<tr><td class="tdtop">'.$langs->trans("NotePrivate").'</td><td>';
|
||||
print nl2br($object->note_private);
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Statut
|
||||
/*print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||
print '<td>';
|
||||
print $object->getLibStatut(4);
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
*/
|
||||
|
||||
// Categories
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) {
|
||||
print '<tr><td>' . $langs->trans( "Categories" ) . '</td>';
|
||||
@ -1240,7 +1259,10 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
print '</div></div></div>';
|
||||
print '<div style="clear:both"></div>';
|
||||
|
||||
print dol_fiche_end();
|
||||
|
||||
// Barre d'actions
|
||||
|
||||
@ -32,36 +32,50 @@ $langs->load("companies");
|
||||
|
||||
|
||||
// Security check
|
||||
$contactid = GETPOST("id",'int');
|
||||
$id = GETPOST("id",'int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
||||
$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
|
||||
|
||||
$contact = new Contact($db);
|
||||
$object = new Contact($db);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
|
||||
|
||||
llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||
|
||||
if ($contactid > 0)
|
||||
if ($id > 0)
|
||||
{
|
||||
$result = $contact->fetch($contactid, $user);
|
||||
$result = $object->fetch($id, $user);
|
||||
|
||||
$contact->info($contactid);
|
||||
$object->info($id);
|
||||
|
||||
|
||||
$head = contact_prepare_head($contact);
|
||||
$head = contact_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'info', $title, 0, 'contact');
|
||||
|
||||
// TODO Put here ref of card
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_print_object_info($contact);
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
dol_print_object_info($object);
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@ -276,20 +276,6 @@ if ($result)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
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;
|
||||
@ -298,7 +284,23 @@ if ($result)
|
||||
{
|
||||
print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname")."): ".$search_firstlast_only;
|
||||
}
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
|
||||
// Ligne des titres
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -1407,26 +1407,19 @@ else
|
||||
print '<td align="right" class="nowrap">';
|
||||
if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=move&rowid='.$objp->rowid.'">';
|
||||
print '<a style="padding-left: 5px;" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=move&rowid='.$objp->rowid.'">';
|
||||
print img_picto($langs->trans("MoveToAnotherContract"),'uparrow');
|
||||
print '</a>';
|
||||
}
|
||||
else {
|
||||
print ' ';
|
||||
}
|
||||
if ($user->rights->contrat->creer && ($object->statut >= 0))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=editline&rowid='.$objp->rowid.'">';
|
||||
print '<a style="padding-left: 5px;" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=editline&rowid='.$objp->rowid.'">';
|
||||
print img_edit();
|
||||
print '</a>';
|
||||
}
|
||||
else {
|
||||
print ' ';
|
||||
}
|
||||
if ( $user->rights->contrat->creer && ($object->statut >= 0))
|
||||
{
|
||||
print ' ';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=deleteline&rowid='.$objp->rowid.'">';
|
||||
print '<a style="padding-left: 5px;" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=deleteline&rowid='.$objp->rowid.'">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
@ -1332,7 +1332,7 @@ class Contrat extends CommonObject
|
||||
|
||||
if (empty($error)) {
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('LINECONTRACT_CREATE',$user);
|
||||
$result=$this->call_trigger('LINECONTRACT_INSERT',$user);
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->db->rollback();
|
||||
@ -2644,7 +2644,7 @@ class ContratLigne extends CommonObjectLine
|
||||
if (!$notrigger)
|
||||
{
|
||||
// Call trigger
|
||||
$result = $this->call_trigger('LINECONTRACT_CREATE', $user);
|
||||
$result = $this->call_trigger('LINECONTRACT_INSERT', $user);
|
||||
if ($result < 0) {
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
|
||||
@ -49,8 +49,10 @@ $search_ref_supplier=GETPOST('search_ref_supplier','alpha');
|
||||
$sall=GETPOST('sall');
|
||||
$search_status=GETPOST('search_status');
|
||||
$socid=GETPOST('socid');
|
||||
$search_user=GETPOST('search_user','int');
|
||||
$search_sale=GETPOST('search_sale','int');
|
||||
$search_product_category=GETPOST('search_product_category','int');
|
||||
|
||||
$search_sale = GETPOST('search_sale','int');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
|
||||
if (! $sortfield) $sortfield="c.rowid";
|
||||
@ -69,7 +71,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
||||
$search_name="";
|
||||
$search_contract="";
|
||||
$search_ref_supplier="";
|
||||
$search_sale="";
|
||||
$search_user='';
|
||||
$search_sale='';
|
||||
$search_product_category='';
|
||||
$sall="";
|
||||
$search_status="";
|
||||
}
|
||||
@ -82,6 +86,7 @@ if ($search_status == '') $search_status=1;
|
||||
*/
|
||||
|
||||
$now=dol_now();
|
||||
$form=new Form($db);
|
||||
$formother = new FormOther($db);
|
||||
$socstatic = new Societe($db);
|
||||
|
||||
@ -99,8 +104,15 @@ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."contrat as c";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
|
||||
if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product';
|
||||
if ($search_user > 0)
|
||||
{
|
||||
$sql.=", ".MAIN_DB_PREFIX."element_contact as ec";
|
||||
$sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc";
|
||||
}
|
||||
$sql.= " WHERE c.fk_soc = s.rowid ";
|
||||
$sql.= " AND c.entity = ".$conf->entity;
|
||||
$sql.= ' AND c.entity IN ('.getEntity('contract', 1).')';
|
||||
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category;
|
||||
if ($socid) $sql.= " AND s.rowid = ".$db->escape($socid);
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
|
||||
@ -122,6 +134,7 @@ if ($search_sale > 0)
|
||||
if ($sall) {
|
||||
$sql .= natural_search(array('s.nom', 'cd.label', 'cd.description'), $sall);
|
||||
}
|
||||
if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user;
|
||||
$sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier, s.nom, s.rowid";
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($conf->liste_limit + 1, $offset);
|
||||
@ -136,26 +149,47 @@ if ($resql)
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
// If the user can view prospects other than his'
|
||||
$moreforfilter='';
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$langs->load("commercial");
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': ';
|
||||
$moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
|
||||
if ($moreforfilter)
|
||||
// If the user can view other users
|
||||
if ($user->rights->user->user->lire)
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': ';
|
||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view categories of products
|
||||
if ($conf->categorie->enabled && $user->rights->produit->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('IncludingProductWithTag'). ': ';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="9">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
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
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
$param='&search_contract='.$search_contract;
|
||||
@ -171,10 +205,11 @@ if ($resql)
|
||||
//print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder);
|
||||
//print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "c.statut","","$param",'align="center"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(0,3).'</td>';
|
||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3,0).'</td>';
|
||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3,1).'</td>';
|
||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(5,3).'</td>';
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"');
|
||||
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -190,7 +225,8 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
//print '<td class="liste_titre"> </td>';
|
||||
print '<td colspan="5" class="liste_titre" align="right"><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")).'">';
|
||||
print '<td class="liste_titre" colspan="5"></td>';
|
||||
print '<td class="liste_titre" align="right"><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")).'">';
|
||||
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></tr>\n";
|
||||
|
||||
@ -250,6 +286,7 @@ if ($resql)
|
||||
print '<td align="center">'.($obj->nb_running>0?$obj->nb_running:'').'</td>';
|
||||
print '<td align="center">'.($obj->nb_expired>0?$obj->nb_expired:'').'</td>';
|
||||
print '<td align="center">'.($obj->nb_closed>0 ?$obj->nb_closed:'').'</td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ if (! empty($_POST['removedfile']) && empty($_POST['removAll']))
|
||||
$upload_dir_tmp = $vardir.'/temp';
|
||||
|
||||
// TODO Delete only files that was uploaded from email form
|
||||
dol_remove_file_process($_POST['removedfile'],0);
|
||||
dol_remove_file_process(GETPOST('removedfile','alpha'),0);
|
||||
$action='presend';
|
||||
}
|
||||
|
||||
|
||||
@ -434,6 +434,109 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return full address of contact
|
||||
*
|
||||
* @param string $htmlkey HTML id to make banner content unique
|
||||
* @param Object $object Object (thirdparty, thirdparty of contact for contact, null for a member)
|
||||
* @return string Full address string
|
||||
*/
|
||||
function getBannerAddress($htmlkey, $object)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$countriesusingstate=array('AU','US','IN','GB','ES','UK','TR');
|
||||
|
||||
$contacti=0;
|
||||
$thirdpartyid=0;
|
||||
if ($this->elemet == 'societe')
|
||||
{
|
||||
$thirdpartyid=$this->id;
|
||||
}
|
||||
if ($this->elemet == 'contact')
|
||||
{
|
||||
$contactid=$this->id;
|
||||
$thirdpartyid=$object->fk_soc;
|
||||
}
|
||||
if ($this->elemet == 'user')
|
||||
{
|
||||
$contactid=$this->contact_id;
|
||||
$thirdpartyid=$object->fk_soc;
|
||||
}
|
||||
|
||||
$out='<!-- BEGIN part to show address block -->';
|
||||
|
||||
$outdone=0;
|
||||
$coords = $this->getFullAddress(1,', ');
|
||||
if ($coords)
|
||||
{
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$namecoords = $this->getFullName($langs,1).'<br>'.$coords;
|
||||
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
||||
$out.='<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
||||
$out.=img_picto($langs->trans("Address"), 'object_address.png');
|
||||
$out.='</a> ';
|
||||
}
|
||||
$out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++;
|
||||
$outdone++;
|
||||
}
|
||||
|
||||
if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS)
|
||||
&& ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state)
|
||||
{
|
||||
$out.=($outdone?'<br>':'').$this->state;
|
||||
$outdone++;
|
||||
}
|
||||
|
||||
if ($this->phone_pro || $this->phone_mobile || $this->phone_perso || $this->fax || $this->office_phone || $this->user_mobile || $this->office_fax) $out.=($outdone?'<br>':'');
|
||||
if ($this->phone && empty($this->phone_pro)) { // For objects that store pro phone into ->phone
|
||||
$out.=dol_print_phone($this->phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++;
|
||||
}
|
||||
if (! empty($this->phone_pro)) {
|
||||
$out.=dol_print_phone($this->phone_pro,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++;
|
||||
}
|
||||
if (! empty($this->phone_mobile)) {
|
||||
$out.=dol_print_phone($this->phone_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++;
|
||||
}
|
||||
if (! empty($this->phone_perso)) {
|
||||
$out.=dol_print_phone($this->phone_perso,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePerso")); $outdone++;
|
||||
}
|
||||
if (! empty($this->fax)) {
|
||||
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++;
|
||||
}
|
||||
if (! empty($this->office_phone)) {
|
||||
$out.=dol_print_phone($this->office_phone,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++;
|
||||
}
|
||||
if (! empty($this->user_mobile)) {
|
||||
$out.=dol_print_phone($this->user_mobile,$country_code['code'],$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++;
|
||||
}
|
||||
if (! empty($this->office_fax)) {
|
||||
$out.=dol_print_phone($this->fax,$country_code['code'],$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++;
|
||||
}
|
||||
|
||||
$out.='<div style="clear: both;"></div>';
|
||||
$outdone=0;
|
||||
if ($this->email)
|
||||
{
|
||||
$out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1);
|
||||
$outdone++;
|
||||
}
|
||||
if ($this->url)
|
||||
{
|
||||
$out.=dol_print_url($this->url,'',0,1);
|
||||
$outdone++;
|
||||
}
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
if ($this->skype) $out.=($outdone?'<br>':'').dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE');
|
||||
}
|
||||
|
||||
$out.='<!-- END Part to show address block -->';
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a link between element $this->element and a contact
|
||||
*
|
||||
|
||||
@ -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)
|
||||
@ -4590,34 +4591,36 @@ class Form
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$out = '';
|
||||
|
||||
// Add code for jquery to use multiselect
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))
|
||||
{
|
||||
$tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT;
|
||||
print '<!-- JS CODE TO ENABLE '.$tmpplugin.' for id '.$htmlname.' -->
|
||||
$out.='<!-- JS CODE TO ENABLE '.$tmpplugin.' for id '.$htmlname.' -->
|
||||
<script type="text/javascript">
|
||||
function formatResult(record) {'."\n";
|
||||
if ($elemtype == 'category')
|
||||
{
|
||||
print ' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
|
||||
$out.=' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
|
||||
return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> \'+record.text+\'</span>\';';
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'return record.text;';
|
||||
$out.='return record.text;';
|
||||
}
|
||||
print ' };
|
||||
$out.= ' };
|
||||
function formatSelection(record) {'."\n";
|
||||
if ($elemtype == 'category')
|
||||
{
|
||||
print ' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
|
||||
$out.=' //return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> <a href="'.DOL_URL_ROOT.'/categories/viewcat.php?type=0&id=\'+record.id+\'">\'+record.text+\'</a></span>\';
|
||||
return \'<span><img src="'.DOL_URL_ROOT.'/theme/eldy/img/object_category.png'.'"> \'+record.text+\'</span>\';';
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'return record.text;';
|
||||
$out.='return record.text;';
|
||||
}
|
||||
print ' };
|
||||
$out.= ' };
|
||||
$(document).ready(function () {
|
||||
$(\'#'.$htmlname.'\').'.$tmpplugin.'({
|
||||
dir: \'ltr\',
|
||||
@ -4635,7 +4638,7 @@ class Form
|
||||
// Try also magic suggest
|
||||
|
||||
// Add data-role="none" to disable jmobile decoration
|
||||
$out = '<select data-role="none" id="'.$htmlname.'" class="multiselect'.($morecss?' '.$morecss:'').'" multiple name="'.$htmlname.'[]"'.($moreattrib?' '.$moreattrib:'').($width?' style="width: '.(preg_match('/%/',$width)?$width:$width.'px').'"':'').'>'."\n";
|
||||
$out .= '<select data-role="none" id="'.$htmlname.'" class="multiselect'.($morecss?' '.$morecss:'').'" multiple name="'.$htmlname.'[]"'.($moreattrib?' '.$moreattrib:'').($width?' style="width: '.(preg_match('/%/',$width)?$width:$width.'px').'"':'').'>'."\n";
|
||||
if (is_array($array) && ! empty($array))
|
||||
{
|
||||
if ($value_as_key) $array=array_combine($array, $array);
|
||||
@ -4664,6 +4667,84 @@ class Form
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show a multiselect form from an array.
|
||||
*
|
||||
* @param string $htmlname Name of select
|
||||
* @param array $array Array with array to show
|
||||
* @return string HTML multiselect string
|
||||
* @see selectarray
|
||||
*/
|
||||
static function multiSelectArrayWithCheckbox($htmlname, $array)
|
||||
{
|
||||
$lis='';
|
||||
$liststring='';
|
||||
|
||||
foreach($array as $key => $val)
|
||||
{
|
||||
if (isset($val['cond']) && ! $val['cond']) continue;
|
||||
if ($val['label'])
|
||||
{
|
||||
$lis.='<li><input type="checkbox" value="'.$key.'"'.($val['checked']?' checked="checked"':'').'/>'.dol_escape_htmltag($val['label']).'</li>';
|
||||
$liststring.=$key.',';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$out ='<!-- Component multiSelectArrayWithCheckbox '.$htmlname.' -->
|
||||
|
||||
<dl class="dropdown">
|
||||
|
||||
<dt>
|
||||
<a href="#">
|
||||
'.img_picto('','list').'
|
||||
<input type="hidden" class="'.$htmlname.'" name="'.$htmlname.'" value="'.$liststring.'">
|
||||
</a>
|
||||
</dt>
|
||||
|
||||
<dd>
|
||||
<div class="multiselectcheckbox'.$htmlname.'">
|
||||
<ul>
|
||||
'.$lis.'
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".dropdown dt a").on(\'click\', function () {
|
||||
$(".dropdown dd ul").slideToggle(\'fast\');
|
||||
});
|
||||
|
||||
$(".dropdown dd ul li a").on(\'click\', function () {
|
||||
$(".dropdown dd ul").hide();
|
||||
});
|
||||
|
||||
function getSelectedValue(id) {
|
||||
return $("#" + id).find("dt a span.value").html();
|
||||
}
|
||||
|
||||
$(document).bind(\'click\', function (e) {
|
||||
var $clicked = $(e.target);
|
||||
if (!$clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide();
|
||||
});
|
||||
|
||||
$(\'.multiselectcheckbox'.$htmlname.' input[type="checkbox"]\').on(\'click\', function () {
|
||||
|
||||
var title = $(this).val() + ",";
|
||||
|
||||
if ($(this).is(\':checked\')) {
|
||||
$(\'.'.$htmlname.'\').val(title + $(\'.'.$htmlname.'\').val());
|
||||
}
|
||||
else {
|
||||
$(\'.'.$htmlname.'\').val( $(\'.'.$htmlname.'\').val().replace(title, \'\') )
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
';
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render list of categories linked to object with id $id and type $type
|
||||
@ -5041,16 +5122,18 @@ class Form
|
||||
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
||||
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field)
|
||||
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
|
||||
* @param string $morehtmlref Code html supplementaire a afficher apres ref
|
||||
* @param string $morehtmlref More html to show after ref
|
||||
* @param string $moreparam More param to add in nav link url.
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||
* @param string $morehtmlleft More html code to show before ref
|
||||
* @param string $morehtmlright More html code to show before navigation arrows
|
||||
* @return string Portion HTML avec ref + boutons nav
|
||||
*/
|
||||
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0)
|
||||
function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlright='')
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
$ret='';
|
||||
$ret='';
|
||||
if (empty($fieldid)) $fieldid='rowid';
|
||||
if (empty($fieldref)) $fieldref='ref';
|
||||
|
||||
@ -5063,14 +5146,27 @@ class Form
|
||||
$next_ref = $object->ref_next?'<a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?'.$paramid.'='.urlencode($object->ref_next).$moreparam.'">'.(empty($conf->dol_use_jmobile)?'>':' ').'</a>':'';
|
||||
|
||||
//print "xx".$previous_ref."x".$next_ref;
|
||||
$ret.='<div style="vertical-align: middle"><div class="inline-block floatleft refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
|
||||
$ret.='<div style="vertical-align: middle">';
|
||||
|
||||
$ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
|
||||
|
||||
$ret.='<div class="inline-block floatleft valignmiddle refid'.(($shownav && ($previous_ref || $next_ref))?' refidpadding':'').'">';
|
||||
|
||||
$ret.=dol_htmlentities($object->$fieldref);
|
||||
// For thirdparty and contact, the ref is he id, so we show something else
|
||||
if ($object->element == 'societe')
|
||||
{
|
||||
$ret.=dol_htmlentities($object->name);
|
||||
}
|
||||
else if (in_array($object->element, array('contact', 'user', 'member')))
|
||||
{
|
||||
$ret.=dol_htmlentities($object->getFullName($langs));
|
||||
}
|
||||
else $ret.=dol_htmlentities($object->$fieldref);
|
||||
if ($morehtmlref)
|
||||
{
|
||||
$ret.=' '.$morehtmlref;
|
||||
}
|
||||
$ret.='</div>';
|
||||
$ret.='</div>';
|
||||
|
||||
if ($previous_ref || $next_ref || $morehtml)
|
||||
{
|
||||
@ -5078,23 +5174,20 @@ class Form
|
||||
}
|
||||
if ($morehtml)
|
||||
{
|
||||
//$ret.='</td><td class="paddingrightonly" align="right">'.$morehtml;
|
||||
$ret.='<li class="noborder litext">'.$morehtml.'</li>';
|
||||
}
|
||||
if ($shownav && ($previous_ref || $next_ref))
|
||||
{
|
||||
//$ret.='</td><td class="nobordernopadding" align="center" width="20">'.$previous_ref.'</td>';
|
||||
//$ret.='<td class="nobordernopadding" align="center" width="20">'.$next_ref;
|
||||
$ret.='<li class="pagination">'.$previous_ref.'</li>';
|
||||
$ret.='<li class="pagination">'.$next_ref.'</li>';
|
||||
}
|
||||
if ($previous_ref || $next_ref || $morehtml)
|
||||
{
|
||||
//$ret.='</td></tr></table>';
|
||||
$ret.='</ul></div>';
|
||||
}
|
||||
$ret.='</div>';
|
||||
|
||||
$ret.='<div class="statusref">'.$morehtmlright.'</div>';
|
||||
$ret.='</div>';
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@ -5131,15 +5224,16 @@ class Form
|
||||
/**
|
||||
* Return HTML code to output a photo
|
||||
*
|
||||
* @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto')
|
||||
* @param object $object Object containing data to retrieve file name
|
||||
* @param int $width Width of photo
|
||||
* @param int $height Height of photo (auto if 0)
|
||||
* @param int $caneditfield Add edit fields
|
||||
* @param string $cssclass CSS name to use on img for photo
|
||||
* @return string HTML code to output photo
|
||||
* @param string $modulepart Key to define module concerned ('societe', 'userphoto', 'memberphoto')
|
||||
* @param object $object Object containing data to retrieve file name
|
||||
* @param int $width Width of photo
|
||||
* @param int $height Height of photo (auto if 0)
|
||||
* @param int $caneditfield Add edit fields
|
||||
* @param string $cssclass CSS name to use on img for photo
|
||||
* @param int $genericifundef Use a generic image if no image avaiable
|
||||
* @return string HTML code to output photo
|
||||
*/
|
||||
static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin')
|
||||
static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
@ -5197,7 +5291,7 @@ class Form
|
||||
}
|
||||
else
|
||||
{
|
||||
$nophoto='/public/theme/common/nophoto.jpg';
|
||||
$nophoto='/public/theme/common/nophoto.png';
|
||||
if (in_array($modulepart,array('userphoto','contact'))) // For module thar are "physical" users
|
||||
{
|
||||
$nophoto='/public/theme/common/user_anonymous.png';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -579,6 +579,19 @@ class Translate
|
||||
{
|
||||
$str=$this->tab_translate[$key];
|
||||
|
||||
// Make some string replacement after translation
|
||||
$replacekey='MAIN_REPLACE_TRANS_'.$this->defaultlang;
|
||||
if (! empty($conf->global->$replacekey)) // Replacement translation variable with string1:newstring1,string2:newstring2
|
||||
{
|
||||
// Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX
|
||||
$tmparray=explode(';', $conf->global->$replacekey);
|
||||
foreach($tmparray as $tmp)
|
||||
{
|
||||
$tmparray2=explode(':',$tmp);
|
||||
$str=preg_replace('/'.preg_quote($tmparray2[0]).'/',$tmparray2[1],$str);
|
||||
}
|
||||
}
|
||||
|
||||
if (! preg_match('/^Format/',$key))
|
||||
{
|
||||
//print $str;
|
||||
|
||||
@ -226,7 +226,7 @@ abstract class DoliDB implements Database
|
||||
*/
|
||||
function order($sortfield=null,$sortorder=null)
|
||||
{
|
||||
if (isset($sortfield))
|
||||
if (! empty($sortfield))
|
||||
{
|
||||
$return='';
|
||||
$fields=explode(',',$sortfield);
|
||||
@ -236,7 +236,7 @@ abstract class DoliDB implements Database
|
||||
else $return.=',';
|
||||
|
||||
$return.=preg_replace('/[^0-9a-z_\.]/i','',$val);
|
||||
if (isset($sortorder))
|
||||
if (! empty($sortorder))
|
||||
{
|
||||
$return.=' '.preg_replace('/[^0-9a-z]/i','',$sortorder);
|
||||
}
|
||||
|
||||
@ -58,6 +58,16 @@ function societe_prepare_head(Societe $object)
|
||||
$head[$h][2] = 'customer';
|
||||
$h++;
|
||||
}
|
||||
if (($object->client==1 || $object->client==2 || $object->client==3) && (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)))
|
||||
{
|
||||
$langs->load("products");
|
||||
// price
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("CustomerPrices");
|
||||
$head[$h][2] = 'price';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (! empty($conf->fournisseur->enabled) && $object->fournisseur && ! empty($user->rights->fournisseur->lire))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id;
|
||||
@ -169,16 +179,6 @@ function societe_prepare_head(Societe $object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (($object->client==1 || $object->client==2 || $object->client==3) && (! empty ( $conf->global->PRODUIT_CUSTOMER_PRICES )))
|
||||
{
|
||||
$langs->load("products");
|
||||
// price
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("CustomerPrices");
|
||||
$head[$h][2] = 'price';
|
||||
$h++;
|
||||
}
|
||||
|
||||
// Log
|
||||
$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
@ -632,40 +632,6 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
// Name - Position
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_name" size="20" value="'.$search_name.'">';
|
||||
print '</td>';
|
||||
|
||||
// Address / Phone
|
||||
print '<td>';
|
||||
//print '<input type="text" class="flat" name="search_addressphone" size="20" value="'.$search_addressphone.'">';
|
||||
print '</td>';
|
||||
|
||||
// Email
|
||||
print '<td> </td>';
|
||||
|
||||
// Status
|
||||
print '<td class="liste_titre maxwidthonsmartphone">';
|
||||
print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status);
|
||||
print '</td>';
|
||||
|
||||
// Add to agenda
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
$colspan++;
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
// Edit
|
||||
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")).'">';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>";
|
||||
|
||||
|
||||
$sql = "SELECT p.rowid, p.lastname, p.firstname, p.fk_pays as country_id, p.civility, p.poste, p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.email, p.skype, p.statut ";
|
||||
$sql .= ", p.civility as civility_id, p.address, p.zip, p.town";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
@ -681,18 +647,50 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$var=true;
|
||||
if ($num)
|
||||
if ($num || (GETPOST('button_search') || GETPOST('button_search.x') || GETPOST('button_search_x')))
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
// Name - Position
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_name" size="20" value="'.$search_name.'">';
|
||||
print '</td>';
|
||||
|
||||
// Address / Phone
|
||||
print '<td>';
|
||||
//print '<input type="text" class="flat" name="search_addressphone" size="20" value="'.$search_addressphone.'">';
|
||||
print '</td>';
|
||||
|
||||
// Email
|
||||
print '<td> </td>';
|
||||
|
||||
// Status
|
||||
print '<td class="liste_titre maxwidthonsmartphone">';
|
||||
print $form->selectarray('search_status', array('-1'=>'','0'=>$contactstatic->LibStatut(0,1),'1'=>$contactstatic->LibStatut(1,1)),$search_status);
|
||||
print '</td>';
|
||||
|
||||
// Add to agenda
|
||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create)
|
||||
{
|
||||
$colspan++;
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
// Edit
|
||||
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")).'">';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>";
|
||||
|
||||
$i=0;
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
$var = !$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
print '<td>';
|
||||
|
||||
$contactstatic->id = $obj->rowid;
|
||||
$contactstatic->ref = $obj->ref;
|
||||
$contactstatic->statut = $obj->statut;
|
||||
$contactstatic->lastname = $obj->lastname;
|
||||
$contactstatic->firstname = $obj->firstname;
|
||||
@ -705,44 +703,23 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
$contactstatic->phone_mobile = $obj->phone_mobile;
|
||||
$contactstatic->phone_perso = $obj->phone_perso;
|
||||
$contactstatic->email = $obj->email;
|
||||
$contactstatic->web = $obj->web;
|
||||
$contactstatic->skype = $obj->skype;
|
||||
|
||||
$country_code = getCountry($obj->country_id, 2);
|
||||
$contactstatic->country_code = $country_code;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
print '<td>';
|
||||
print $contactstatic->getNomUrl(1,'',0,'&backtopage='.urlencode($backtopage));
|
||||
print '</td><td>';
|
||||
if ($obj->poste) print $obj->poste;
|
||||
print '</td>';
|
||||
|
||||
$country_code = getCountry($obj->country_id, 'all');
|
||||
|
||||
// Address and phone
|
||||
print '<td>';
|
||||
$outdone=0;
|
||||
$contactstatic->address = $obj->address;
|
||||
$contactstatic->zip = $obj->zip;
|
||||
$contactstatic->town = $obj->town;
|
||||
$contactstatic->country_id = $obj->country_id;
|
||||
$coords = $contactstatic->getFullAddress(1,', ');
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
$namecoords = $contactstatic->getFullName($langs,1).'<br>'.$coords;
|
||||
// hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
||||
print '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.dol_escape_js($namecoords).'\',\''.dol_escape_js($langs->trans("HelpCopyToClipboard")).'\');">';
|
||||
print img_picto($langs->trans("Address"), 'object_address.png');
|
||||
print '</a> ';
|
||||
}
|
||||
if ($coords) { print dol_print_address($coords,'address_contact_'.$obj->rowid, 'contact', $obj->rowid); $outdone++; }
|
||||
|
||||
if ($obj->phone_pro || $obj->phone_mobile || $obj->phone_perso || $obj->fax) print ($outdone?'<br>':'');
|
||||
if ($obj->phone_pro) { print dol_print_phone($obj->phone_pro,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; }
|
||||
if ($obj->phone_mobile) { print dol_print_phone($obj->phone_mobile,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; }
|
||||
if ($obj->phone_perso) { print dol_print_phone($obj->phone_perso,$country_code['code'],$obj->rowid,$object->id,'AC_TEL',' ','phone'); $outdone++; }
|
||||
if ($obj->fax) { print dol_print_phone($obj->fax,$country_code['code'],$obj->rowid,$object->id,'AC_FAX',' ','fax'); $outdone++; }
|
||||
|
||||
print '<div style="clear: both;"></div>';
|
||||
$outdone=0;
|
||||
if ($obj->email) print dol_print_email($obj->email,$obj->rowid,$object->id,'AC_EMAIL',0,0,1);
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
if ($obj->skype) print ($outdone?'<br>':'').dol_print_skype($obj->skype,$obj->rowid,$object->id,'AC_SKYPE');
|
||||
}
|
||||
print $contactstatic->getBannerAddress('contact', $object);
|
||||
print '</td>';
|
||||
|
||||
// Status
|
||||
|
||||
@ -1516,7 +1516,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
|
||||
* @param int $donotdeletefile 1=Do not delete physically file
|
||||
* @return void
|
||||
*/
|
||||
function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=0)
|
||||
function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=1)
|
||||
{
|
||||
global $db,$user,$conf,$langs,$_FILES;
|
||||
|
||||
|
||||
@ -840,6 +840,58 @@ function dol_get_fiche_end($notab=0)
|
||||
else return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show tab footer of a card
|
||||
*
|
||||
* @param object $object Object to show
|
||||
* @param string $paramid Name of parameter to use to name the id into the URL link
|
||||
* @param string $morehtml More html content to output just before the nav bar
|
||||
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
||||
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field)
|
||||
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
|
||||
* @param string $morehtmlref More html to show after ref
|
||||
* @param string $moreparam More param to add in nav link url.
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||
* @param string $morehtmlleft More html code to show before ref
|
||||
* @param string $morehtmlright More html code to show before navigation arrows
|
||||
* @return void
|
||||
*/
|
||||
function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='')
|
||||
{
|
||||
global $conf, $form, $user, $langs;
|
||||
|
||||
//$showlogo=$object->logo;
|
||||
$showlogo=1;
|
||||
$showbarcode=empty($conf->barcode->enabled)?0:($object->barcode?1:0);
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0;
|
||||
$modulepart='societe';
|
||||
if ($object->element == 'contact') $modulepart='contact';
|
||||
if ($object->element == 'member') $modulepart='memberphoto';
|
||||
if ($object->element == 'user') $modulepart='userphoto';
|
||||
|
||||
print '<div class="arearef heightref valignmiddle" width="100%">';
|
||||
if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto($modulepart,$object,0,0,0,'photoref').'</div>';
|
||||
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
|
||||
if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
||||
} else {
|
||||
$morehtmlright.=$object->getLibStatut(2);
|
||||
}
|
||||
if (! empty($object->name_nalias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>';
|
||||
$morehtmlref.='<div class="refidno">';
|
||||
$morehtmlref.=$object->getBannerAddress('refaddress',$object);
|
||||
$morehtmlref.='</div>';
|
||||
if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && in_array($object->element, array('societe', 'contact', 'member')))
|
||||
{
|
||||
$morehtmlref.='<div style="clear: both;"></div><div class="refidno">';
|
||||
$morehtmlref.=$langs->trans("TechnicalID").': '.$object->id;
|
||||
$morehtmlref.='</div>';
|
||||
}
|
||||
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
|
||||
print '</div>';
|
||||
print '<div class="underrefbanner clearboth"></div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a string with the label tag dedicated to the HTML edit field.
|
||||
*
|
||||
@ -915,7 +967,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
else if (in_array($object->country_code,array('ES','TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country
|
||||
{
|
||||
$ret .= ($ret ? $sep : '' ).$object->zip;
|
||||
$ret .= ($object->town?' '.$object->town:'');
|
||||
$ret .= ($object->town?(($object->zip?' ':'').$object->town):'');
|
||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||
{
|
||||
$ret.="\n".$object->state;
|
||||
@ -924,11 +976,11 @@ function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='')
|
||||
|
||||
else // Other: title firstname name \n address lines \n zip town \n country
|
||||
{
|
||||
$ret .= ($ret ? $sep : '' ).$object->zip;
|
||||
$ret .= ($object->town?' '.$object->town:'');
|
||||
$ret .= $object->zip ? (($ret ? $sep : '' ).$object->zip) : '';
|
||||
$ret .= ($object->town?(($object->zip?' ':$sep).$object->town):'');
|
||||
if ($object->state && in_array($object->country_code,$countriesusingstate))
|
||||
{
|
||||
$ret.=", ".$object->state;
|
||||
$ret.=($ret?", ":'').$object->state;
|
||||
}
|
||||
}
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
@ -1315,20 +1367,25 @@ function dol_print_size($size,$shortvalue=0,$shortunit=0)
|
||||
* @param string $url Url to show
|
||||
* @param string $target Target for link
|
||||
* @param int $max Max number of characters to show
|
||||
* @param int $withpicto With picto
|
||||
* @return string HTML Link
|
||||
*/
|
||||
function dol_print_url($url,$target='_blank',$max=32)
|
||||
function dol_print_url($url,$target='_blank',$max=32,$withpicto=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
if (empty($url)) return '';
|
||||
|
||||
$link='<a href="';
|
||||
if (! preg_match('/^http/i',$url)) $link.='http://';
|
||||
$link.=$url;
|
||||
if ($target) $link.='" target="'.$target.'">';
|
||||
$link.='"';
|
||||
if ($target) $link.=' target="'.$target.'"';
|
||||
$link.='>';
|
||||
if (! preg_match('/^http/i',$url)) $link.='http://';
|
||||
$link.=dol_trunc($url,$max);
|
||||
$link.='</a>';
|
||||
return $link;
|
||||
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto($langs->trans("Url"), 'object_globe.png').' ':'').$link.'</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1435,12 +1492,13 @@ function dol_print_skype($skype,$cid=0,$socid=0,$addlink=0,$max=64)
|
||||
* @param string $country Country code to use for formatting
|
||||
* @param int $cid Id of contact if known
|
||||
* @param int $socid Id of third party if known
|
||||
* @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
* @param string $addlink ''=no link to create action, 'AC_TEL'=add link to clicktodial (if module enabled) and add link to create event (if conf->global->AGENDA_ADDACTIONFORPHONE set)
|
||||
* @param string $separ Separation between numbers for a better visibility example : xx.xx.xx.xx.xx
|
||||
* @param string $withpicto Show picto
|
||||
* @param string $titlealt Text to show on alt
|
||||
* @return string Formated phone number
|
||||
*/
|
||||
function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='')
|
||||
function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ=" ",$withpicto='',$titlealt='')
|
||||
{
|
||||
global $conf,$user,$langs,$mysoc;
|
||||
|
||||
@ -1520,7 +1578,11 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ="
|
||||
}
|
||||
}
|
||||
|
||||
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto(($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone")), 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'</div>';
|
||||
if (empty($titlealt))
|
||||
{
|
||||
$titlealt=($withpicto=='fax'?$langs->trans("Fax"):$langs->trans("Phone"));
|
||||
}
|
||||
return '<div class="nospan float" style="margin-right: 10px">'.($withpicto?img_picto($titlealt, 'object_'.($withpicto=='fax'?'phoning_fax':'phoning').'.png').' ':'').$newphone.'</div>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1591,27 +1653,33 @@ function dol_user_country()
|
||||
/**
|
||||
* Format address string
|
||||
*
|
||||
* @param string $address Address
|
||||
* @param int $htmlid Html ID (for example 'gmap')
|
||||
* @param int $mode thirdparty|contact|member|other
|
||||
* @param int $id Id of object
|
||||
* @return void
|
||||
* @param string $address Address
|
||||
* @param int $htmlid Html ID (for example 'gmap')
|
||||
* @param int $mode thirdparty|contact|member|other
|
||||
* @param int $id Id of object
|
||||
* @param int $noprint No output. Result is the function return
|
||||
* @return string|void Nothing if noprint is 0, formatted address if noprint is 1
|
||||
* @see dol_format_address
|
||||
*/
|
||||
function dol_print_address($address, $htmlid, $mode, $id)
|
||||
function dol_print_address($address, $htmlid, $mode, $id, $noprint=0)
|
||||
{
|
||||
global $conf, $user, $langs, $hookmanager;
|
||||
|
||||
$out = '';
|
||||
|
||||
if ($address)
|
||||
{
|
||||
if ($hookmanager) {
|
||||
$parameters = array('element' => $mode, 'id' => $id);
|
||||
$reshook = $hookmanager->executeHooks('printAddress', $parameters, $address);
|
||||
print $hookmanager->resPrint;
|
||||
$out.=$hookmanager->resPrint;
|
||||
}
|
||||
if (empty($reshook)) {
|
||||
print nl2br($address);
|
||||
if (empty($reshook))
|
||||
{
|
||||
$out.=nl2br($address);
|
||||
$showgmap=$showomap=0;
|
||||
|
||||
// TODO Add a hook here
|
||||
if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1;
|
||||
if ($mode=='contact' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) $showgmap=1;
|
||||
if ($mode=='member' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) $showgmap=1;
|
||||
@ -1619,19 +1687,20 @@ function dol_print_address($address, $htmlid, $mode, $id)
|
||||
if ($mode=='contact' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) $showomap=1;
|
||||
if ($mode=='member' && ! empty($conf->openstreetmap->enabled) && ! empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) $showomap=1;
|
||||
|
||||
// TODO Add a hook here
|
||||
if ($showgmap)
|
||||
{
|
||||
$url=dol_buildpath('/google/gmaps.php?mode='.$mode.'&id='.$id,1);
|
||||
print ' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
|
||||
$out.=' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
|
||||
}
|
||||
if ($showomap)
|
||||
{
|
||||
$url=dol_buildpath('/openstreetmap/maps.php?mode='.$mode.'&id='.$id,1);
|
||||
print ' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'_openstreetmap" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
|
||||
$out.=' <a href="'.$url.'" target="_gmaps"><img id="'.$htmlid.'_openstreetmap" border="0" src="'.DOL_URL_ROOT.'/theme/common/gmap.png"></a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($noprint) return $out;
|
||||
else print $out;
|
||||
}
|
||||
|
||||
|
||||
@ -2669,7 +2738,8 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
||||
|
||||
$sortorder=strtoupper($sortorder);
|
||||
$out='';
|
||||
|
||||
$sortimg='';
|
||||
|
||||
$tag='th';
|
||||
if ($thead==2) $tag='div';
|
||||
|
||||
@ -2678,25 +2748,33 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
||||
if ($field && ($sortfield == $field || $sortfield == preg_replace("/^[^\.]+\./","",$field))) $out.= '<'.$tag.' class="'.$prefix.'liste_titre_sel" '. $moreattrib.'>';
|
||||
else $out.= '<'.$tag.' class="'.$prefix.'liste_titre" '. $moreattrib.'>';
|
||||
|
||||
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||
if (empty($thead) && $field) // If this is a sort field
|
||||
{
|
||||
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
|
||||
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
|
||||
$options=preg_replace('/&+/i','&',$options);
|
||||
if (! preg_match('/^&/',$options)) $options='&'.$options;
|
||||
|
||||
if ($sortorder == 'DESC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
|
||||
if ($sortorder == 'ASC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
|
||||
if ($field != $sortfield)
|
||||
{
|
||||
if ($sortorder == 'DESC') $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
|
||||
if ($sortorder == 'ASC' || ! $sortorder) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($sortorder == 'DESC' || ! $sortorder) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
|
||||
if ($sortorder == 'ASC') $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
|
||||
}
|
||||
}
|
||||
|
||||
$out.=$name;
|
||||
|
||||
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||
if (empty($thead) && $field) // If this is a sort field
|
||||
{
|
||||
$out.='</a>';
|
||||
}
|
||||
|
||||
if (empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||
if (empty($thead) && $field) // If this is a sort field
|
||||
{
|
||||
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
|
||||
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
|
||||
@ -2704,27 +2782,33 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
||||
if (! preg_match('/^&/',$options)) $options='&'.$options;
|
||||
|
||||
//print " ";
|
||||
$out.= '<img width="2" src="'.DOL_URL_ROOT.'/theme/common/transparent.png" alt=""><span class="nowrap">';
|
||||
$sortimg.= '<img width="2" src="'.DOL_URL_ROOT.'/theme/common/transparent.png" alt="">';
|
||||
$sortimg.= '<span class="nowrap">';
|
||||
|
||||
if (! $sortorder || $field != $sortfield)
|
||||
{
|
||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
||||
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
||||
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($sortorder == 'DESC' ) {
|
||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",1).'</a>';
|
||||
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",0).'</a>';
|
||||
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",1).'</a>';
|
||||
$sortimg.= img_up("Z-A",0);
|
||||
}
|
||||
if ($sortorder == 'ASC' ) {
|
||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",1).'</a>';
|
||||
$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
||||
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">'.img_down("A-Z",1).'</a>';
|
||||
//$out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">'.img_up("Z-A",0).'</a>';
|
||||
$sortimg.= img_down("A-Z",0);
|
||||
}
|
||||
}
|
||||
|
||||
$out.= '</span>';
|
||||
$sortimg.= '</span>';
|
||||
}
|
||||
|
||||
$out.=$sortimg;
|
||||
|
||||
$out.='</'.$tag.'>';
|
||||
|
||||
return $out;
|
||||
|
||||
@ -896,16 +896,6 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
|
||||
if (strcmp($statut, '') && $statut >= 0) $title=$langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$statut]);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($title,"index.php","","","","",$sortfield,$sortorder);
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
$sql = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount, COUNT(DISTINCT t.rowid) as nb"; // We use DISTINCT here because line can be doubled if task has 2 links to same user
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
@ -962,6 +952,17 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($title.' <span class="badge">'.$num.'</span>',$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder);
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS)) print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
@ -355,7 +355,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
print '<div class="inline-block" style="margin-top: 10px; margin-bottom: 10px; margin-right: 20px; margin-left: 20px;">';
|
||||
$file=$dirtheme."/".$subdir."/thumb.png";
|
||||
$url=$urltheme."/".$subdir."/thumb.png";
|
||||
if (! file_exists($file)) $url=$urltheme."/common/nophoto.jpg";
|
||||
if (! file_exists($file)) $url=DOL_URL_ROOT.'/public/theme/common/nophoto.png';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.(GETPOST("optioncss")?'&optioncss='.GETPOST("optioncss",'alpha',1):'').($fuser?'&id='.$fuser->id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
|
||||
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
|
||||
else $title=$langs->trans("ShowPreview");
|
||||
@ -462,7 +462,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
|
||||
if ($color) print '<input type="text" class="colorthumb" disabled="disabled" style="padding: 1px; margin-top: 0; margin-bottom: 0; width: 36px; background-color: #'.$color.'" value="'.$color.'">';
|
||||
else print $langs->trans("Default");
|
||||
}
|
||||
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print ' ('.$langs->trans("Default").': <strong>6e7896</strong>, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -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';
|
||||
}
|
||||
|
||||
|
||||
@ -270,7 +270,11 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
||||
else $socobject = $object->client;
|
||||
else {
|
||||
$socobject = $object->client;
|
||||
// if we have a BILLING contact and we dont use it as recipient we store the contact object for later use
|
||||
$contactobject = $object->contact;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -344,8 +348,12 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
||||
$array_propal=is_object($propal_object)?$this->get_substitutionarray_object($propal_object,$outputlangs,'propal'):array();
|
||||
$array_other=$this->get_substitutionarray_other($outputlangs);
|
||||
// retrieve contact information for use in invoice as contact_xxx tags
|
||||
$array_thirdparty_contact = array();
|
||||
if ($usecontact)
|
||||
$array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact');
|
||||
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal,$array_other);
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal,$array_other,$array_thirdparty_contact);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
||||
|
||||
@ -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)";
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
/**
|
||||
* \defgroup webservices Module webservices
|
||||
* \brief Module to enable client for supplier WebServices
|
||||
* \file htdocs/core/modules/modSyncSupplierWebServices.class.php
|
||||
* \file htdocs/core/modules/modWebServicesClient.class.php
|
||||
* \ingroup webservices
|
||||
* \brief File to describe client for supplier webservices module
|
||||
*/
|
||||
@ -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++;
|
||||
}
|
||||
}
|
||||
@ -288,9 +288,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
dol_mkdir($conf->propal->dir_temp);
|
||||
|
||||
|
||||
// If BILLING contact defined on invoice, we use it
|
||||
// If CUSTOMER contact defined on proposal, we use it
|
||||
$usecontact=false;
|
||||
$arrayidcontact=$object->getIdContact('external','BILLING');
|
||||
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
|
||||
if (count($arrayidcontact) > 0)
|
||||
{
|
||||
$usecontact=true;
|
||||
@ -302,13 +302,16 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
|
||||
else $socobject = $object->client;
|
||||
else {
|
||||
$socobject = $object->client;
|
||||
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
|
||||
$contactobject = $object->contact;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$socobject=$object->client;
|
||||
}
|
||||
|
||||
// Make substitution
|
||||
$substitutionarray=array(
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
@ -369,8 +372,12 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
|
||||
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
||||
$array_other=$this->get_substitutionarray_other($outputlangs);
|
||||
// retrieve contact information for use in proposal as contact_xxx tags
|
||||
$array_thirdparty_contact = array();
|
||||
if ($usecontact)
|
||||
$array_thirdparty_contact=$this->get_substitutionarray_contact($contactobject,$outputlangs,'contact');
|
||||
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other);
|
||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||
// Call the ODTSubstitution hook
|
||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray);
|
||||
|
||||
@ -21,7 +21,7 @@ $module = $object->element;
|
||||
$note_public = 'note_public';
|
||||
$note_private = 'note_private';
|
||||
|
||||
$colwidth=(isset($colwidth)?$colwidth:25);
|
||||
$colwidth=(isset($colwidth)?$colwidth:(empty($cssclass)?'25':''));
|
||||
|
||||
$permission=(isset($permission)?$permission:(isset($user->rights->$module->creer)?$user->rights->$module->creer:0)); // If already defined by caller page
|
||||
$moreparam=(isset($moreparam)?$moreparam:'');
|
||||
@ -69,12 +69,12 @@ else $typeofdata='textarea:12:100';
|
||||
<!-- BEGIN PHP TEMPLATE NOTES -->
|
||||
<div class="border table-border centpercent">
|
||||
<div class="table-border-row">
|
||||
<div class="table-key-border-col"<?php echo ' style="width: '.$colwidth.'%"'; ?>><?php echo $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?></div>
|
||||
<div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, $moreparam); ?></div>
|
||||
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div>
|
||||
</div>
|
||||
<?php if (empty($user->societe_id)) { ?>
|
||||
<div class="table-border-row">
|
||||
<div class="table-key-border-col"<?php echo ' style="width: '.$colwidth.'%"'; ?>><?php echo $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?></div>
|
||||
<div class="table-key-border-col<?php echo (empty($cssclass)?'':' '.$cssclass); ?>"<?php echo ($colwidth ? ' style="width: '.$colwidth.'%"' : ''); ?>><?php echo $form->editfieldkey("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, $moreparam); ?></div>
|
||||
<div class="table-val-border-col"><?php echo $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdata, '', null, null, $moreparam); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
@ -114,12 +114,12 @@ else {
|
||||
}
|
||||
|
||||
// Free line
|
||||
echo '<span>';
|
||||
echo '<span class="prod_entry_mode_free">';
|
||||
// Show radio free line
|
||||
if ($forceall >= 0 && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
|
||||
{
|
||||
echo '<label for="prod_entry_mode_free">';
|
||||
echo '<input type="radio" name="prod_entry_mode" id="prod_entry_mode_free" value="free"';
|
||||
echo '<input type="radio" class="prod_entry_mode_free" name="prod_entry_mode" id="prod_entry_mode_free" value="free"';
|
||||
//echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : ((empty($forceall) && (empty($conf->product->enabled) || empty($conf->service->enabled)))?' checked':'') );
|
||||
echo (GETPOST('prod_entry_mode')=='free' ? ' checked' : '');
|
||||
echo '> ';
|
||||
@ -147,9 +147,9 @@ else {
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
if ($forceall >= 0) echo '<br>';
|
||||
echo '<span>';
|
||||
echo '<span class="prod_entry_mode_predef">';
|
||||
echo '<label for="prod_entry_mode_predef">';
|
||||
echo '<input type="radio" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode')=='predef'?' checked':'').'> ';
|
||||
echo '<input type="radio" class="prod_entry_mode_predef" name="prod_entry_mode" id="prod_entry_mode_predef" value="predef"'.(GETPOST('prod_entry_mode')=='predef'?' checked':'').'> ';
|
||||
if (empty($senderissupplier))
|
||||
{
|
||||
if (! empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans('PredefinedProductsToSell');
|
||||
|
||||
@ -167,7 +167,7 @@ class InterfaceDemo extends DolibarrTriggers
|
||||
case 'CONTRACT_CANCEL':
|
||||
case 'CONTRACT_CLOSE':
|
||||
case 'CONTRACT_DELETE':
|
||||
case 'LINECONTRACT_CREATE':
|
||||
case 'LINECONTRACT_INSERT':
|
||||
case 'LINECONTRACT_UPDATE':
|
||||
case 'LINECONTRACT_DELETE':
|
||||
|
||||
|
||||
@ -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> ";
|
||||
|
||||
@ -131,16 +131,15 @@ if ($object->id > 0)
|
||||
|
||||
dol_fiche_head($head, 'supplier', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table width="100%" class="border">';
|
||||
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
|
||||
print '</td></tr>';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr><td>'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans('AliasNameShort').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
@ -168,35 +167,6 @@ if ($object->id > 0)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Address
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
|
||||
dol_print_address($object->address,'gmap','thirdparty',$object->id);
|
||||
print '</td></tr>';
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
|
||||
//$img=picto_from_langcode($object->country_code);
|
||||
$img='';
|
||||
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
|
||||
else print ($img?$img.' ':'').$object->country;
|
||||
print '</td></tr>';
|
||||
|
||||
// EMail
|
||||
print '<td>'.$langs->trans('EMail').'</td><td colspan="3">'.dol_print_email($object->email,0,$object->id,'AC_EMAIL').'</td></tr>';
|
||||
|
||||
// Web
|
||||
print '<tr><td>'.$langs->trans("Web").'</td><td colspan="3">'.dol_print_url($object->url).'</td></tr>';
|
||||
|
||||
// Phone
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td style="min-width: 25%;">'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
|
||||
|
||||
// Fax
|
||||
print '<td>'.$langs->trans("Fax").'</td><td style="min-width: 25%;">'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
// Assujetti a TVA ou pas
|
||||
print '<tr>';
|
||||
print '<td class="nowrap">'.$langs->trans('VATIsUsed').'</td><td colspan="3">';
|
||||
|
||||
@ -1083,7 +1083,7 @@ if (empty($reshook))
|
||||
$upload_dir_tmp = $vardir.'/temp';
|
||||
|
||||
// TODO Delete only files that was uploaded from email form
|
||||
dol_remove_file_process($_POST['removedfile'],0);
|
||||
dol_remove_file_process(GETPOST('removedfile','alpha'),0);
|
||||
$action='presend';
|
||||
}
|
||||
|
||||
|
||||
@ -917,7 +917,7 @@ if (empty($reshook))
|
||||
$upload_dir_tmp = $vardir.'/temp';
|
||||
|
||||
// TODO Delete only files that was uploaded from email form
|
||||
dol_remove_file_process($_POST['removedfile'],0);
|
||||
dol_remove_file_process(GETPOST('removedfile','alpha'),0);
|
||||
$action='presend';
|
||||
}
|
||||
|
||||
|
||||
@ -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>
|
||||
@ -195,13 +195,14 @@ if ($resql)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
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,8 +210,8 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'valign="middle"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,'valign="middle"',$sortfield,$sortorder);
|
||||
@ -238,7 +239,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">';
|
||||
|
||||
@ -218,26 +218,13 @@ if ($id > 0)
|
||||
$title = $langs->trans("User");
|
||||
dol_fiche_head($head, 'paidholidays', $title, 0, 'user');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// LastName
|
||||
print '<tr><td width="25%">'.$langs->trans("LastName").'</td>';
|
||||
print '<td colspan="2">'.$fuser->lastname.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// FirstName
|
||||
print '<tr><td width="25%">'.$langs->trans("FirstName").'</td>';
|
||||
print '<td colspan="2">'.$fuser->firstname.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '</table><br>';
|
||||
dol_banner_tab($fuser,'id','',$user->rights->user->user->lire || $user->admin);
|
||||
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -6873,7 +6873,7 @@
|
||||
<md5file name="modCashDesk.class.php">69982f8171837cd8669bfe9c2f08dc8f</md5file>
|
||||
<md5file name="modLdap.class.php">ddf6dfeb77c98411b4d5434f20c24483</md5file>
|
||||
<md5file name="modFacture.class.php">c23010fa68c5996cb5977f84a6bb7ceb</md5file>
|
||||
<md5file name="modSyncSupplierWebServices.class.php">90a300e9bd857966226c68dca8660456</md5file>
|
||||
<md5file name="modWebServicesClient.class.php">822961d86ae558588632b3b08c085b89</md5file>
|
||||
<md5file name="index.html">d41d8cd98f00b204e9800998ecf8427e</md5file>
|
||||
<md5file name="modIncoterm.class.php">b4e9f07aa5268af49d3bb9429719b201</md5file>
|
||||
<md5file name="modFTP.class.php">8293bd60fe13ac64c22f8500b346821c</md5file>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -97,6 +97,7 @@ DolibarrHasDetectedError=Dolibarr has detected a technical error
|
||||
InformationToHelpDiagnose=This is information that can help diagnostic
|
||||
MoreInformation=More information
|
||||
TechnicalInformation=Technical information
|
||||
TechnicalID=Technical ID
|
||||
NotePublic=Note (public)
|
||||
NotePrivate=Note (private)
|
||||
PrecisionUnitIsLimitedToXDecimals=Dolibarr was setup to limit precision of unit prices to <b>%s</b> decimals.
|
||||
|
||||
@ -101,6 +101,7 @@ CorrectStock=Correct stock
|
||||
AddPhoto=Add photo
|
||||
ListOfStockMovements=List of stock movements
|
||||
BuyingPrice=Buying price
|
||||
PriceForEachProduct=Products with specific prices
|
||||
SupplierCard=Supplier card
|
||||
CommercialCard=Commercial card
|
||||
AllWays=Path to find your product in stock
|
||||
|
||||
@ -281,8 +281,6 @@ else
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
$colspan=6;
|
||||
@ -294,19 +292,23 @@ else
|
||||
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ',1);
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="'.$colspan.'">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
// Lignes des titres
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label",$param,"","",$sortfield,$sortorder);
|
||||
|
||||
@ -215,27 +215,35 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ');
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock?' checked':'').'>';
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="9">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
}
|
||||
$moreforfilter.='</div>';
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
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
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
$param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref";
|
||||
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
// Lignes des titres
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
|
||||
|
||||
@ -227,27 +227,32 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ');
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
//$moreforfilter.=$langs->trans("StockTooLow").' <input type="checkbox" name="toolowstock" value="1"'.($toolowstock?' checked':'').'>';
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="11">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
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
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
$param="&tosell=$tosell&tobuy=$tobuy".(isset($type)?"&type=$type":"")."&fourn_id=$fourn_id&snom=$snom&sref=$sref&batch=$batch&eatby=$eatby&sellby=$sellby";
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">';
|
||||
|
||||
// Lignes des titres
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref",$param,"","",$sortfield,$sortorder);
|
||||
|
||||
@ -188,7 +188,8 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("CustomersOrders"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,$totalrecords,'');
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print '<div class="divsearchfield">';
|
||||
print $langs->trans('Period').' ('.$langs->trans("OrderDate") .') - ';
|
||||
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
|
||||
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
|
||||
@ -197,9 +198,10 @@ if ($id > 0 || ! empty($ref))
|
||||
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 '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","",$option,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder);
|
||||
|
||||
@ -198,7 +198,8 @@ if ($id > 0 || ! empty($ref)) {
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, '');
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print '<div class="divsearchfield">';
|
||||
print $langs->trans('Period') . ' (' . $langs->trans("OrderDate") . ') - ';
|
||||
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
|
||||
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
|
||||
@ -207,9 +208,10 @@ if ($id > 0 || ! empty($ref)) {
|
||||
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 '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
|
||||
|
||||
@ -147,7 +147,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&id=$product->id",$sortfield,$sortorder,'',$num,0,'');
|
||||
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"c.rowid","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||
@ -155,9 +155,9 @@ if ($id > 0 || ! empty($ref))
|
||||
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","","&id=".$product->id,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.date_contrat","","&id=".$product->id,'align="center"',$sortfield,$sortorder);
|
||||
//print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&id=".$product->id,'align="right"',$sortfield,$sortorder);
|
||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(0,3).'</td>';
|
||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(4,3).'</td>';
|
||||
print '<td class="liste_titre" width="16">'.$staticcontratligne->LibStatut(5,3).'</td>';
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(0,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(4,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print_liste_field_titre($staticcontratligne->LibStatut(5,3),$_SERVER["PHP_SELF"],"",'','','width="16"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
$contratstatic=new Contrat($db);
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/product/stats/facture.php
|
||||
* \ingroup product service facture
|
||||
* \brief Page des stats des factures clients pour un produit
|
||||
* \brief Page of invoice statistics for a product
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -128,7 +128,8 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</div>';
|
||||
|
||||
|
||||
if ($user->rights->facture->lire) {
|
||||
if ($user->rights->facture->lire)
|
||||
{
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql.= " f.facnumber, d.total_ht as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
|
||||
@ -189,7 +190,8 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("CustomersInvoices"),$page,$_SERVER["PHP_SELF"],"&id=".$product->id,$sortfield,$sortorder,'',$num,$totalrecords,'');
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print '<div class="divsearchfield">';
|
||||
print $langs->trans('Period').' ('.$langs->trans("DateInvoice") .') - ';
|
||||
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
|
||||
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
|
||||
@ -198,9 +200,10 @@ if ($id > 0 || ! empty($ref))
|
||||
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 '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"s.rowid","",$option,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$option,'',$sortfield,$sortorder);
|
||||
|
||||
@ -190,7 +190,8 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, '');
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print '<div class="divsearchfield">';
|
||||
print $langs->trans('Period') . ' (' . $langs->trans("DateInvoice") . ') - ';
|
||||
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
|
||||
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
|
||||
@ -199,9 +200,10 @@ if ($id > 0 || ! empty($ref))
|
||||
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 '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "s.rowid", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
|
||||
|
||||
@ -191,7 +191,8 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalrecords, '');
|
||||
print '<div class="liste_titre">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print '<div class="divsearchfield">';
|
||||
print $langs->trans('Period') . ' (' . $langs->trans("DatePropal") . ') - ';
|
||||
print $langs->trans('Month') . ':<input class="flat" type="text" size="4" name="search_month" value="' . $search_month . '"> ';
|
||||
print $langs->trans('Year') . ':' . $formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5);
|
||||
@ -200,9 +201,10 @@ if ($id > 0 || ! empty($ref))
|
||||
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 '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
$i = 0;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<table class="tagtable liste listwithfilterbefore" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.rowid", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
|
||||
|
||||
@ -229,6 +229,7 @@ $sql.= " AND p.fk_statut = 1";
|
||||
if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
$sql.= " GROUP BY s.nom, s.rowid";
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
|
||||
$var=true;
|
||||
$resql = $db->query($sql);
|
||||
|
||||
@ -274,15 +274,18 @@ if ($resql)
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
//print '<tr class="liste_titre">';
|
||||
//print '<td class="liste_titre" colspan="'.$colspan.'">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
//print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder);
|
||||
|
||||
@ -269,7 +269,8 @@ dol_fiche_head($head,'byyear',$langs->trans("Statistics"), 0, '');
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
print '<form name="stats" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="liste_titre" colspan="2">'.$langs->trans("Filter").'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
@ -293,8 +294,8 @@ print '</table>';
|
||||
print '</form>';
|
||||
print '<br><br>';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr height="24">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre" height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NbOfProjects").'</td>';
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
@ -305,13 +306,15 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
$var=true;
|
||||
foreach ($data_all_year as $val)
|
||||
{
|
||||
$year = $val['year'];
|
||||
while ($year && $oldyear > $year+1)
|
||||
{ // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.'</a></td>';
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
@ -321,7 +324,8 @@ foreach ($data_all_year as $val)
|
||||
print '<td align="right">0</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '<tr height="24">';
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].' height="24">';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&mode='.$mode.($socid>0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.'</a></td>';
|
||||
print '<td align="right">'.$val['nb'].'</td>';
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
|
||||
@ -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="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Project").'</td>';
|
||||
print '<td>'.$langs->trans("ProjectStatus").'</td>';
|
||||
|
||||
@ -146,9 +146,7 @@ $nav.='</form>';
|
||||
|
||||
print_barre_liste('Title of my list', 3, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 5000, '', 0, $nav);
|
||||
|
||||
?>
|
||||
<table class="liste noborder tagtable centpercent" id="tablelines3">
|
||||
<?php
|
||||
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('This is a select list for a filter A'). ': ';
|
||||
$cate_arbo = array('field1'=>'value1a into the select list A','field2'=>'value2a');
|
||||
@ -175,11 +173,15 @@ $moreforfilter.='</div>';
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="10">';
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'" id="tablelines3">';
|
||||
?>
|
||||
<tr class="liste_titre">
|
||||
<?php print getTitleFieldOfList($langs->trans('title1'),0,$_SERVER["PHP_SELF"],'aaa','','','align="left"',$sortfield,$sortorder); ?>
|
||||
@ -188,7 +190,9 @@ if (! empty($moreforfilter))
|
||||
</tr>
|
||||
<tr class="pair"><td><?php echo $productspecimen->getNomUrl(1); ?></td><td align="right">b1</td><td class="tdlineupdown" align="left">c1</td></tr>
|
||||
<tr class="impair"><td>a2</td><td align="right">b2</td><td class="tdlineupdown" align="left">c2</td></tr>
|
||||
</table>
|
||||
<?php
|
||||
print '</table>';
|
||||
?>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
htdocs/public/theme/common/nophoto.png
Normal file
BIN
htdocs/public/theme/common/nophoto.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
@ -80,14 +80,15 @@ if ($socid)
|
||||
|
||||
dol_fiche_head($head, 'agenda', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
@ -114,47 +115,11 @@ if ($socid)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$object->barcode.'</td></tr>';
|
||||
}
|
||||
|
||||
print "<tr><td>".$langs->trans('Address')."</td><td colspan=\"3\">";
|
||||
dol_print_address($object->address, 'gmap', 'thirdparty', $object->id);
|
||||
print "</td></tr>";
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$object->zip."</td>";
|
||||
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$object->town."</td></tr>";
|
||||
|
||||
// Country
|
||||
if ($object->country) {
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
//$img=picto_from_langcode($object->country_code);
|
||||
$img='';
|
||||
print ($img?$img.' ':'');
|
||||
print $object->country;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// EMail
|
||||
print '<tr><td>'.$langs->trans('EMail').'</td><td colspan="3">';
|
||||
print dol_print_email($object->email,0,$object->id,'AC_EMAIL');
|
||||
print '</td></tr>';
|
||||
|
||||
// Web
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||
print dol_print_url($object->url);
|
||||
print '</td></tr>';
|
||||
|
||||
// Phone / Fax
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
/*
|
||||
* Barre d'action
|
||||
|
||||
@ -33,7 +33,7 @@ $langs->load("suppliers");
|
||||
$langs->load("banks");
|
||||
|
||||
// Security check
|
||||
$socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
||||
$socid = GETPOST("socid");
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'societe','','');
|
||||
|
||||
@ -50,18 +50,18 @@ if($_GET["socid"] && $_GET["commid"])
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
|
||||
$soc = new Societe($db);
|
||||
$soc->id = $_GET["socid"];
|
||||
$soc->fetch($_GET["socid"]);
|
||||
$object = new Societe($db);
|
||||
$object->id = $_GET["socid"];
|
||||
$object->fetch($_GET["socid"]);
|
||||
|
||||
|
||||
$parameters=array('id'=>$_GET["commid"]);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$soc,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook)) $soc->add_commercial($user, $_GET["commid"]);
|
||||
if (empty($reshook)) $object->add_commercial($user, $_GET["commid"]);
|
||||
|
||||
header("Location: commerciaux.php?socid=".$soc->id);
|
||||
header("Location: commerciaux.php?socid=".$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -71,23 +71,23 @@ if($_GET["socid"] && $_GET["commid"])
|
||||
}
|
||||
}
|
||||
|
||||
if($_GET["socid"] && $_GET["delcommid"])
|
||||
if ($socid && $_GET["delcommid"])
|
||||
{
|
||||
$action = 'delete';
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$soc = new Societe($db);
|
||||
$soc->id = $_GET["socid"];
|
||||
$soc->fetch($_GET["socid"]);
|
||||
$object = new Societe($db);
|
||||
$object->id = $_GET["socid"];
|
||||
$object->fetch($_GET["socid"]);
|
||||
|
||||
$parameters=array('id'=>$_GET["delcommid"]);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$soc,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook)) $soc->del_commercial($user, $_GET["delcommid"]);
|
||||
if (empty($reshook)) $object->del_commercial($user, $_GET["delcommid"]);
|
||||
|
||||
header("Location: commerciaux.php?socid=".$soc->id);
|
||||
header("Location: commerciaux.php?socid=".$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -107,63 +107,44 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($_GET["socid"])
|
||||
if ($socid)
|
||||
{
|
||||
$soc = new Societe($db);
|
||||
$soc->id = $_GET["socid"];
|
||||
$result=$soc->fetch($_GET["socid"]);
|
||||
$object = new Societe($db);
|
||||
$result=$object->fetch($socid);
|
||||
|
||||
$action='view';
|
||||
|
||||
$head=societe_prepare_head2($soc);
|
||||
$head=societe_prepare_head2($object);
|
||||
|
||||
dol_fiche_head($head, 'salesrepresentative', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
/*
|
||||
* Fiche societe en mode visu
|
||||
*/
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
|
||||
print $soc->code_client;
|
||||
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
|
||||
print '<td class="titlefield">'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
|
||||
print $object->code_client;
|
||||
if ($object->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
|
||||
print '</td>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td>';
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td>'.$object->prefix_comm.'</td>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td width="20%">'.$soc->zip."</td>";
|
||||
print '<td>'.$langs->trans('Town').'</td><td>'.$soc->town."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$soc->country.'</td>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->phone,$soc->country_code,0,$soc->id,'AC_TEL').'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
|
||||
print '</td></tr>';
|
||||
|
||||
// Liste les commerciaux
|
||||
print '<tr><td valign="top">'.$langs->trans("SalesRepresentatives").'</td>';
|
||||
print '<tr><td>'.$langs->trans("SalesRepresentatives").'</td>';
|
||||
print '<td colspan="3">';
|
||||
|
||||
$sql = "SELECT u.rowid, u.lastname, u.firstname";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql .= " WHERE sc.fk_soc =".$soc->id;
|
||||
$sql .= " WHERE sc.fk_soc =".$object->id;
|
||||
$sql .= " AND sc.fk_user = u.rowid";
|
||||
$sql .= " ORDER BY u.lastname ASC ";
|
||||
dol_syslog('societe/commerciaux.php::list salesman sql = '.$sql,LOG_DEBUG);
|
||||
@ -177,7 +158,7 @@ if ($_GET["socid"])
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$parameters=array('socid'=>$soc->id);
|
||||
$parameters=array('socid'=>$object->id);
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$obj,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
|
||||
@ -210,6 +191,8 @@ if ($_GET["socid"])
|
||||
|
||||
print '</table>';
|
||||
print "</div>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
if ($user->rights->societe->creer && $user->rights->societe->client->voir)
|
||||
|
||||
@ -116,14 +116,15 @@ if (empty($socid))
|
||||
$head = societe_prepare_head($object);
|
||||
dol_fiche_head($head, 'consumption', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="25%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
|
||||
print '<tr id="name_alias"><td class="titlefield"><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>';
|
||||
print '<td colspan="3">'.$object->name_alias.'</td></tr>';
|
||||
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
@ -173,6 +174,8 @@ if ($object->fournisseur)
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -109,17 +109,15 @@ if ($object->id)
|
||||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
|
||||
print '<table class="border"width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
@ -155,6 +153,8 @@ if ($object->id)
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
$modulepart = 'societe';
|
||||
|
||||
@ -57,6 +57,8 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($b);
|
||||
|
||||
$title=$langs->trans("ThirdParty");
|
||||
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Info");
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
@ -82,11 +84,21 @@ if ($socid > 0)
|
||||
|
||||
dol_fiche_head($head, 'info', $langs->trans("ThirdParty"), 0, 'company');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/contact/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
dol_print_object_info($object);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@ -195,7 +195,7 @@ if ($socname)
|
||||
|
||||
|
||||
/*
|
||||
* Mode Liste
|
||||
* Mode List
|
||||
*/
|
||||
/*
|
||||
REM: Regle sur droits "Voir tous les clients"
|
||||
@ -208,9 +208,9 @@ $title=$langs->trans("ListOfThirdParties");
|
||||
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.barcode, s.town, s.datec, s.code_client, s.code_fournisseur, ";
|
||||
$sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,";
|
||||
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4";
|
||||
$sql.= ",s.fk_pays";
|
||||
$sql.= ",typent.code as typent_code";
|
||||
$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4,";
|
||||
$sql.= " s.fk_pays, s.tms as date_update, s.datec as date_creation,";
|
||||
$sql.= " typent.code as typent_code";
|
||||
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
|
||||
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||
// We'll need these fields in order to filter by categ
|
||||
@ -321,27 +321,23 @@ if ($resql)
|
||||
$moreforfilter='';
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$htmlother->select_categories(Categories::TYPE_CUSTOMER,$search_categ,'search_categ');
|
||||
$moreforfilter.=' ';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if ($user->rights->societe->client->voir || $socid)
|
||||
{
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('SalesRepresentatives'). ': ';
|
||||
$moreforfilter.=$htmlother->select_salesrepresentatives($search_sale,'search_sale',$user);
|
||||
}
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="8">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
*/
|
||||
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
|
||||
@ -349,10 +345,29 @@ if ($resql)
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="liste" width="100%">';
|
||||
// Define list of fields to show into list
|
||||
$arrayfields=array(
|
||||
's.nom'=>array('label'=>$langs->trans("Company"), 'checked'=>1),
|
||||
's.barcode'=>array('label'=>$langs->trans("BarCode"), 'checked'=>1, 'cond'=>(! empty($conf->barcode->enabled))),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>1),
|
||||
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>1),
|
||||
's.siren'=>array('label'=>$langs->trans("ProfId1Short"), 'checked'=>1),
|
||||
's.siret'=>array('label'=>$langs->trans("ProfId2Short"), 'checked'=>1),
|
||||
's.ape'=>array('label'=>$langs->trans("ProfId3Short"), 'checked'=>1),
|
||||
's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>1),
|
||||
's.status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>200),
|
||||
's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
);
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
$selectotherfields=$form->multiSelectArrayWithCheckbox('selectotherfields', $arrayfields);
|
||||
}
|
||||
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
||||
|
||||
// Lines of titles
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($conf->barcode->enabled)) print_liste_field_titre($langs->trans("BarCode"), $_SERVER["PHP_SELF"], "s.barcode",$param,'','',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,'',$sortfield,$sortorder);
|
||||
@ -367,7 +382,7 @@ if ($resql)
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print_liste_field_titre($selectotherfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
|
||||
print "</tr>\n";
|
||||
|
||||
// Fields title search
|
||||
@ -376,22 +391,23 @@ 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="'.dol_escape_htmltag($search_nom).'">';
|
||||
print '</td>';
|
||||
// Barcode
|
||||
if (! empty($conf->barcode->enabled))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.htmlspecialchars($sbarcode).'">';
|
||||
print '<input class="flat" type="text" name="sbarcode" size="6" value="'.dol_escape_htmltag($sbarcode).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// 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="'.dol_escape_htmltag($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">';
|
||||
@ -399,19 +415,19 @@ if ($resql)
|
||||
print '</td>';
|
||||
// IdProf1
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof1" value="'.htmlspecialchars($search_idprof1).'">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof1" value="'.dol_escape_htmltag($search_idprof1).'">';
|
||||
print '</td>';
|
||||
// IdProf2
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof2" value="'.htmlspecialchars($search_idprof2).'">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof2" value="'.dol_escape_htmltag($search_idprof2).'">';
|
||||
print '</td>';
|
||||
// IdProf3
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof3" value="'.htmlspecialchars($search_idprof3).'">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof3" value="'.dol_escape_htmltag($search_idprof3).'">';
|
||||
print '</td>';
|
||||
// IdProf4
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof4" value="'.htmlspecialchars($search_idprof4).'">';
|
||||
print '<input class="flat" size="4" type="text" name="search_idprof4" value="'.dol_escape_htmltag($search_idprof4).'">';
|
||||
print '</td>';
|
||||
// Type (customer/prospect/supplier)
|
||||
print '<td class="liste_titre" align="middle">';
|
||||
|
||||
@ -75,15 +75,15 @@ if ($id > 0)
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr><td>'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
@ -112,9 +112,12 @@ if ($id > 0)
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
$colwidth='25';
|
||||
//$colwidth='25';
|
||||
$cssclass='titlefield';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||
|
||||
|
||||
|
||||
@ -142,15 +142,15 @@ if ($result > 0)
|
||||
|
||||
dol_fiche_head($head, 'notify', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
|
||||
print '<table class="border"width="100%">';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("ThirdPartyName").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
// Alias names (commercial, trademark or alias names)
|
||||
print '<tr><td valign="top">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">';
|
||||
print $object->name_alias;
|
||||
print "</td></tr>";
|
||||
|
||||
@ -186,6 +186,8 @@ if ($result > 0)
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
// Help
|
||||
@ -248,6 +250,7 @@ if ($result > 0)
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user