diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php
index 41939ffd0ce..d61b3c991e4 100644
--- a/htdocs/accountancy/bookkeeping/list.php
+++ b/htdocs/accountancy/bookkeeping/list.php
@@ -546,14 +546,14 @@ if (! empty($arrayfields['t.label_operation']['checked']))
// Debit
if (! empty($arrayfields['t.debit']['checked']))
{
- print '
';
- print ''.$langs->trans("Total").': ' . "\n";
+ print ''.$langs->trans("Total").': ' . "\n";
print '' . price($debit) . ' ';
print '' . price($credit) . ' ';
print ' ';
diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php
index 0a4065762aa..076c1d7b3c8 100644
--- a/htdocs/accountancy/customer/lines.php
+++ b/htdocs/accountancy/customer/lines.php
@@ -316,8 +316,8 @@ if ($result) {
print ' ';
//print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
print '';
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1);
//print ' ';
@@ -336,8 +336,8 @@ if ($result) {
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "fd.description", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "fd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "fd.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index a6818ecdfd1..6768e94ce02 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -383,8 +383,8 @@ if ($result) {
print ' ';
//print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
print '';
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1);
//print ' ';
@@ -405,8 +405,8 @@ if ($result) {
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"');
@@ -504,7 +504,7 @@ if ($result) {
// Vat rate
if ($objp->vat_tx_l != $objp->vat_tx_p)
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
- print ' ';
+ print ' ';
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
print ' ';
diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php
index 12182bdaa43..5d1c4ba7fc3 100644
--- a/htdocs/accountancy/expensereport/lines.php
+++ b/htdocs/accountancy/expensereport/lines.php
@@ -269,11 +269,11 @@ if ($result) {
print '';
print ' ';
print ' ';
- print ' ';
+ print ' ';
print ' ';
print ' ';
- print ' ';
- print '';
+ print ' ';
+ print '';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
@@ -285,7 +285,7 @@ if ($result) {
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre('');
diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php
index c0d77fc753a..bf6f597924d 100644
--- a/htdocs/accountancy/expensereport/list.php
+++ b/htdocs/accountancy/expensereport/list.php
@@ -315,8 +315,8 @@ if ($result) {
print '';
print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
print ' ';
print ' ';
print '';
@@ -331,8 +331,8 @@ if ($result) {
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "erd.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("IntoAccount", '', '', '', '', 'align="center"', $sortfield, $sortorder);
$checkpicto='';
diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php
index cf5d36d6e80..247c2db93cd 100644
--- a/htdocs/accountancy/supplier/lines.php
+++ b/htdocs/accountancy/supplier/lines.php
@@ -321,8 +321,8 @@ if ($result) {
print ' ';
//print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
print '';
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1);
// print ' ';
@@ -343,8 +343,8 @@ if ($result) {
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index e04be12df3b..99f0fb30ae5 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -383,8 +383,8 @@ if ($result) {
print ' ';
//print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
print '';
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1);
//print ' ';
@@ -406,8 +406,8 @@ if ($result) {
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="right"', $sortfield, $sortorder);
- print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'class="right"', $sortfield, $sortorder);
+ print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', 'align="center"');
@@ -498,7 +498,7 @@ if ($result) {
// Vat rate
if ($objp->vat_tx_l != $objp->vat_tx_p)
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
- print ' ';
+ print ' ';
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
print ' ';
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 959dacba2c1..f5cb86304d5 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -2520,7 +2520,7 @@ class Adherent extends CommonObject
/**
- * Charge les informations d'ordre info dans l'objet adherent
+ * Load type info information in the member object
*
* @param int $id Id of member to load
* @return void
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 263012df782..dd9da927c25 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -164,7 +164,7 @@ class AdherentType extends CommonObject
}
/**
- * Met a jour en base donnees du type
+ * Updating the type in the database
*
* @param User $user Object user making change
* @param int $notrigger 1=do not execute triggers, 0 otherwise
@@ -234,9 +234,9 @@ class AdherentType extends CommonObject
}
/**
- * Fonction qui permet de supprimer le status de l'adherent
+ * Function to delete the member's status
*
- * @return int >0 if OK, 0 if not found, < 0 if KO
+ * @return int > 0 if OK, 0 if not found, < 0 if KO
*/
function delete()
{
@@ -267,7 +267,7 @@ class AdherentType extends CommonObject
}
/**
- * Fonction qui permet de recuperer le status de l'adherent
+ * Function that retrieves the status of the member
*
* @param int $rowid Id of member type to load
* @return int <0 if KO, >0 if OK
diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index d27c2365f47..79841823d08 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -566,7 +566,7 @@ if (! empty($arrayfields['d.tms']['checked']))
// Status
if (! empty($arrayfields['d.statut']['checked']))
{
- print '';
+ print ' ';
$liststatus=array(
'-1'=>$langs->trans("Draft"),
'1'=>$langs->trans("Validated"),
@@ -613,7 +613,7 @@ $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // No
print $hookmanager->resPrint;
if (! empty($arrayfields['d.datec']['checked'])) print_liste_field_titre($arrayfields['d.datec']['label'],$_SERVER["PHP_SELF"],"d.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['d.tms']['checked'])) print_liste_field_titre($arrayfields['d.tms']['label'],$_SERVER["PHP_SELF"],"d.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
-if (! empty($arrayfields['d.statut']['checked'])) print_liste_field_titre($arrayfields['d.statut']['label'],$_SERVER["PHP_SELF"],"d.statut","",$param,'align="right"',$sortfield,$sortorder);
+if (! empty($arrayfields['d.statut']['checked'])) print_liste_field_titre($arrayfields['d.statut']['label'],$_SERVER["PHP_SELF"],"d.statut","",$param,'class="right"',$sortfield,$sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
print " \n";
@@ -842,7 +842,7 @@ while ($i < min($num, $limit))
// Status
if (! empty($arrayfields['d.statut']['checked']))
{
- print ''.$langs->trans("Logo").' (png,jpg) ';
print '';
print ' ';
- print ' ';
+ print ' ';
if (! empty($mysoc->logo_mini)) {
print ''.img_delete($langs->trans("Delete")).' ';
if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index fedccb49642..bc48425017b 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -304,10 +304,10 @@ print '';
if ($conf->use_javascript_ajax)
{
print ' ';
- print '';
+ print '
';
print ' ';
print '
';
- print '
';
+ print '
';
print ' ';
print '
';
}
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 8a52a4346f8..ee3083410dd 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1246,7 +1246,7 @@ if ($id)
}
if ($id == 4) print '
';
print '
';
- print '
';
+ print ' ';
if ($filterfound)
{
$searchpicto=$form->showFilterAndCheckAddButtons(0);
diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php
index f388cea8b55..bb6fa4bdd87 100644
--- a/htdocs/admin/emailcollector_list.php
+++ b/htdocs/admin/emailcollector_list.php
@@ -385,7 +385,7 @@ $parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
-print ' ';
+print ' ';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php
index 12703d5d38a..a5cb2d8b396 100644
--- a/htdocs/admin/mails_senderprofile_list.php
+++ b/htdocs/admin/mails_senderprofile_list.php
@@ -356,7 +356,7 @@ $parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
-print '
';
+print ' ';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index ab79bfec0fa..844fe093315 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -621,7 +621,7 @@ if ($resql)
// There is several pages
if ($num > $listlimit)
{
- print '
';
+ print ' ';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '');
print ' ';
}
@@ -657,7 +657,7 @@ if ($resql)
}
if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) print '
';
// Action column
- print '
';
+ print ' ';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php
index c70d8c08a91..acb4ab2166e 100644
--- a/htdocs/admin/resource.php
+++ b/htdocs/admin/resource.php
@@ -79,7 +79,7 @@ print '
';
print '
';
print '';
print ''.$langs->trans("Parameters").' '."\n";
-print ''.$langs->trans("Value").' '."\n";
+print ''.$langs->trans("Value").' '."\n";
print ' ';
@@ -88,13 +88,13 @@ print ' ';
print ''.$langs->trans("UseSearchToSelectResource").' ';
if (empty($conf->use_javascript_ajax))
{
- print '';
+ print ' ';
print $langs->trans("NotAvailableWhenAjaxDisabled");
print ' ';
}
else
{
- print '';
+ print ' ';
$arrval=array(
'0'=>$langs->trans("No"),
'1'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch",1).')',
diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php
index 7a4581ac8ec..91973ea22c3 100644
--- a/htdocs/admin/security.php
+++ b/htdocs/admin/security.php
@@ -330,7 +330,7 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){
print '
';
print '
';
- print '
';
+ print '';
print '';
print ''.$langs->trans("Save").' ';
print ' ';
diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php
index 9c857964a3c..e212ee8b949 100644
--- a/htdocs/admin/syslog.php
+++ b/htdocs/admin/syslog.php
@@ -202,7 +202,7 @@ print ' ';
print '';
print '';
print ''.$langs->trans("Type").' '.$langs->trans("Value").' ';
-print ' ';
+print ' ';
print " \n";
foreach ($syslogModules as $moduleName)
diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php
index b3fd9ef4359..723cf4e33a0 100644
--- a/htdocs/admin/taxes.php
+++ b/htdocs/admin/taxes.php
@@ -147,7 +147,7 @@ else
print ''.$langs->trans("VATReturn").' ';
if (! $conf->use_javascript_ajax)
{
- print '';
+ print ' ';
print $langs->trans("NotAvailableWhenAjaxDisabled");
print " ";
}
diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php
index 4558af0baae..e00e2c6a98e 100644
--- a/htdocs/admin/tools/listevents.php
+++ b/htdocs/admin/tools/listevents.php
@@ -255,7 +255,7 @@ if ($result)
//print ' ';
print '';
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print ' ';
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index f857ab7ed11..a791cdde4ed 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -500,7 +500,7 @@ if ($mode == 'searchkey')
//}
print '';
// Action column
- print '';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print ' ';
diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php
index 3f52896b631..4abcaed9b6a 100644
--- a/htdocs/admin/website.php
+++ b/htdocs/admin/website.php
@@ -502,7 +502,7 @@ if ($id)
fieldListWebsites($fieldlist,$obj,$tabname[$id],'add');
- print '';
+ print ' ';
if ($action != 'edit')
{
print ' ';
@@ -585,7 +585,7 @@ if ($id)
if (empty($reshook)) fieldListWebsites($fieldlist,$obj,$tabname[$id],'edit');
- print ' ';
+ print ' ';
print ' ';
}
else
diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php
index c6710f290cc..262b203f26e 100644
--- a/htdocs/asset/list.php
+++ b/htdocs/asset/list.php
@@ -364,7 +364,7 @@ $parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
-print '';
+print ' ';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print ' ';
diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php
index 8c2835d856c..36ac6615efa 100644
--- a/htdocs/blockedlog/admin/blockedlog.php
+++ b/htdocs/blockedlog/admin/blockedlog.php
@@ -116,7 +116,7 @@ if (!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY)) {
// Example with a yes / no select
print '';
print ''.$langs->trans("BlockedLogAuthorityUrl").img_info($langs->trans('BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote')).' ';
- print '';
+ print ' ';
print ' \n";
@@ -182,7 +182,7 @@ if ($resql)
print ''.$obj->position." ";
// Actions
- print '';
+ print ' ';
if ($user->rights->bookmark->creer)
{
print "rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"])."\">".img_edit()." ";
diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php
index 273a23f5b1e..42f136d0aa3 100644
--- a/htdocs/categories/index.php
+++ b/htdocs/categories/index.php
@@ -169,7 +169,7 @@ foreach($fulltree as $key => $val)
'fk_menu'=>$val['fk_parent'],
'entry'=>'color?' style="background: #'.$categstatic->color.';"':' style="background: #aaa"').'>'.$li.' '.
//''.dolGetFirstLineOfText($desc).' '.
- ''.img_view().' '.
+ ''.img_view().' '.
'
'
);
}
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 0cb414be421..e755bbcf2b6 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -263,7 +263,7 @@ if ($object->fetch($id) >= 0)
//print ' '.$langs->trans("NbOfUniqueEMails").' ';
print ''.$langs->trans("NbOfUniqueEMails").'
';
//print ''.$langs->trans("Filter").' ';
- print ''.$langs->trans("Filter").'
';
+ print ''.$langs->trans("Filter").'
';
//print ' ';
print '
';
//print "\n";
@@ -363,7 +363,7 @@ if ($object->fetch($id) >= 0)
}
print '';
- print '';
+ print '
';
if ($allowaddtarget)
{
try {
@@ -378,7 +378,7 @@ if ($object->fetch($id) >= 0)
}
print '
';
- print '
';
+ print '
';
if ($allowaddtarget)
{
print '
';
@@ -501,11 +501,11 @@ if ($object->fetch($id) >= 0)
print ' ';
print '';
//Statut
- print '
';
+ print ' ';
print $formmailing->selectDestinariesStatus($search_dest_status,'search_dest_status',1);
print ' ';
// Action column
- print '
';
+ print ' ';
$searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
print $searchpicto;
print ' ';
@@ -526,7 +526,7 @@ if ($object->fetch($id) >= 0)
{
print_liste_field_titre("DateSending",$_SERVER["PHP_SELF"],"mc.date_envoi",$param,'','align="center"',$sortfield,$sortorder);
}
- print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"mc.statut",$param,'','align="right"',$sortfield,$sortorder);
+ print_liste_field_titre("Status",$_SERVER["PHP_SELF"],"mc.statut",$param,'','class="right"',$sortfield,$sortorder);
print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch ');
print '';
@@ -590,13 +590,13 @@ if ($object->fetch($id) >= 0)
if ($obj->statut == 0)
{
print '
';
- print '
'.$langs->trans("MailingStatusNotSent");
+ print ' '.$langs->trans("MailingStatusNotSent");
print ' ';
}
else
{
print '
'.$obj->date_envoi.' ';
- print '
';
+ print ' ';
print $object::libStatutDest($obj->statut, 2, $obj->error_text);
print ' ';
}
diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php
new file mode 100644
index 00000000000..5c8dd23a332
--- /dev/null
+++ b/htdocs/contact/consumption.php
@@ -0,0 +1,657 @@
+
+ * Copyright (C) 2004-2016 Laurent Destailleur
+ * Copyright (C) 2013-2015 Juanjo Menent
+ * Copyright (C) 2015 Marcos GarcĂa
+ * Copyright (C) 2015-2017 Ferran Marcet
+ *
+ * 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 .
+ */
+
+/**
+ * \file htdocs/societe/consumption.php
+ * \ingroup societe
+ * \brief Add a tab on thirpdarty view to list all products/services bought or sells by thirdparty
+ */
+
+require "../main.inc.php";
+require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
+require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
+
+// Security check
+$id = GETPOST('id', 'int');
+
+$result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
+$object = new Contact($db);
+if ($id > 0) $object->fetch($id);
+if(empty($object->thirdparty)) $object->fetch_thirdparty();
+$socid = $object->thirdparty->id;
+
+// Sort & Order fields
+$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
+$sortfield = GETPOST("sortfield",'alpha');
+$sortorder = GETPOST("sortorder",'alpha');
+$page = GETPOST("page",'int');
+if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
+$offset = $limit * $page;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+if (! $sortorder) $sortorder='DESC';
+if (! $sortfield) $sortfield='dateprint';
+
+// Search fields
+$sref=GETPOST("sref");
+$sprod_fulldescr=GETPOST("sprod_fulldescr");
+$month = GETPOST('month','int');
+$year = GETPOST('year','int');
+
+// Clean up on purge search criteria ?
+if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // Both test are required to be compatible with all browsers
+{
+ $sref='';
+ $sprod_fulldescr='';
+ $year='';
+ $month='';
+}
+// Customer or supplier selected in drop box
+$thirdTypeSelect = GETPOST("third_select_id");
+$type_element = GETPOST('type_element')?GETPOST('type_element'):'';
+
+// Load translation files required by the page
+$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products"));
+
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('consumptioncontact'));
+
+
+/*
+ * Actions
+ */
+
+$parameters=array('id'=>$id);
+$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');
+
+
+/*
+ * View
+ */
+$form = new Form($db);
+$formother = new FormOther($db);
+$productstatic=new Product($db);
+$objsoc = new Societe($db);
+
+$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
+$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
+llxHeader('',$title,$help_url);
+
+if (empty($id))
+{
+ dol_print_error($db);
+ exit;
+}
+
+$head = contact_prepare_head($object);
+dol_fiche_head($head, 'consumption', $langs->trans("ContactsAddresses"), -1, 'contact');
+
+$linkback = ''.$langs->trans("BackToList").' ';
+
+$morehtmlref='';
+if (empty($conf->global->SOCIETE_DISABLE_CONTACTS))
+{
+ $objsoc->fetch($socid);
+ // Thirdparty
+ $morehtmlref.=$langs->trans('ThirdParty') . ' : ';
+ if ($objsoc->id > 0) $morehtmlref.=$objsoc->getNomUrl(1, 'contact');
+ else $morehtmlref.=$langs->trans("ContactNotLinkedToCompany");
+}
+$morehtmlref.='
';
+
+dol_banner_tab($object, 'id', $linkback, ($user->societe_id?0:1), 'rowid', 'nom', $morehtmlref);
+
+print '';
+
+print '
';
+print '
';
+
+// Civility
+print ''.$langs->trans("UserTitle").' ';
+print $object->getCivilityLabel();
+print ' ';
+
+if ($object->thirdparty->client)
+{
+ $thirdTypeArray['customer']=$langs->trans("customer");
+ if ($conf->propal->enabled && $user->rights->propal->lire) $elementTypeArray['propal']=$langs->transnoentitiesnoconv('Proposals');
+ if ($conf->commande->enabled && $user->rights->commande->lire) $elementTypeArray['order']=$langs->transnoentitiesnoconv('Orders');
+ if ($conf->facture->enabled && $user->rights->facture->lire) $elementTypeArray['invoice']=$langs->transnoentitiesnoconv('Invoices');
+ if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementTypeArray['contract']=$langs->transnoentitiesnoconv('Contracts');
+}
+
+if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeArray['fichinter']=$langs->transnoentitiesnoconv('Interventions');
+
+if ($object->thirdparty->fournisseur)
+{
+ $thirdTypeArray['supplier']=$langs->trans("supplier");
+ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice']=$langs->transnoentitiesnoconv('SuppliersInvoices');
+ if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']=$langs->transnoentitiesnoconv('SuppliersOrders');
+
+ // There no contact type for supplier proposals
+// if ($conf->fournisseur->enabled && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals');
+}
+
+print '
';
+
+print '
';
+
+dol_fiche_end();
+print ' ';
+
+
+print '";
+
+// End of page
+llxFooter();
+$db->close();
diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php
index d4001ad0733..cfd65825dc2 100644
--- a/htdocs/core/lib/contact.lib.php
+++ b/htdocs/core/lib/contact.lib.php
@@ -58,6 +58,15 @@ function contact_prepare_head(Contact $object)
$head[$tab][2] = 'perso';
$tab++;
+ // Related items
+ if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->fournisseur->enabled))
+ {
+ $head[$tab][0] = DOL_URL_ROOT.'/contact/consumption.php?id='.$object->id;
+ $head[$tab][1] = $langs->trans("Referers");
+ $head[$tab][2] = 'consumption';
+ $tab++;
+ }
+
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index 4814af72b19..aafa14bf894 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -73,6 +73,11 @@ class ProductFournisseur extends Product
public $fourn_remise; // discount for quantity (amount)
public $product_fourn_id; // product-supplier id
+ /**
+ * @var int ID user_id - user who created/updated supplier price
+ */
+ public $user_id;
+
/**
* @var int ID availability delay - visible/used if option FOURN_PRODUCT_AVAILABILITY is on (duplicate information compared to delivery delay)
*/
@@ -294,7 +299,32 @@ class ProductFournisseur extends Product
if ($this->product_fourn_price_id > 0)
{
- $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price";
+ // check if price already logged, if not first log current price
+ $logPrices = $this->listProductFournisseurPriceLog($this->product_fourn_price_id);
+ if (is_array($logPrices) && count($logPrices) == 0)
+ {
+ $currentPfp = new self($this->db);
+ $result = $currentPfp->fetch_product_fournisseur_price($this->product_fourn_price_id);
+ if ($result > 0 && $currentPfp->fourn_price != 0)
+ {
+ $currentPfpUser = new User($this->db);
+ $result = $currentPfpUser->fetch($currentPfp->user_id);
+ if ($result > 0) {
+ $currentPfp->logPrice(
+ $currentPfpUser,
+ $currentPfp->date_creation,
+ $currentPfp->fourn_price,
+ $currentPfp->fourn_qty,
+ $currentPfp->fourn_multicurrency_price,
+ $currentPfp->fourn_multicurrency_unitprice,
+ $currentPfp->fourn_multicurrency_tx,
+ $currentPfp->fourn_multicurrency_id,
+ $currentPfp->fourn_multicurrency_code
+ );
+ }
+ }
+ }
+ $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price";
$sql.= " SET fk_user = " . $user->id." ,";
$sql.= " ref_fourn = '" . $this->db->escape($ref_fourn) . "',";
$sql.= " desc_fourn = '" . $this->db->escape($desc_fourn) . "',";
@@ -332,8 +362,9 @@ class ProductFournisseur extends Product
$result=$this->call_trigger('SUPPLIER_PRODUCT_BUYPRICE_UPDATE', $user);
if ($result < 0) $error++;
// End call triggers
- if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
- $result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrency, $multicurrency_code);
+ if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG))
+ {
+ $result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrenc, $multicurrency_code);
if ($result < 0) {
$error++;
}
@@ -457,7 +488,7 @@ class ProductFournisseur extends Product
$sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.default_vat_code, pfp.info_bits as fourn_tva_npr, pfp.fk_availability,";
$sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product, pfp.charges, pfp.fk_supplier_price_expression, pfp.delivery_time_days,";
- $sql.= " pfp.supplier_reputation";
+ $sql.= " pfp.supplier_reputation, pfp.fk_user, pfp.datec";
$sql.= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code";
$sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
$sql.= " WHERE pfp.rowid = ".$rowid;
@@ -491,7 +522,8 @@ class ProductFournisseur extends Product
$this->fk_supplier_price_expression = $obj->fk_supplier_price_expression;
$this->supplier_reputation = $obj->supplier_reputation;
$this->default_vat_code = $obj->default_vat_code;
-
+ $this->user_id = $obj->fk_user;
+ $this->date_creation = $this->db->jdate($obj->datec);
$this->fourn_multicurrency_price = $obj->multicurrency_price;
$this->fourn_multicurrency_unitprice = $obj->multicurrency_unitprice;
$this->fourn_multicurrency_tx = $obj->multicurrency_tx;
@@ -882,14 +914,14 @@ class ProductFournisseur extends Product
/**
* List supplier prices log of a supplier price
*
- * @param int $fourn_id Id of supplier price
- * @param string $sortfield Sort field
- * @param string $sortorder Sort order
- * @param int $limit Limit
- * @param int $offset Offset
- * @return array Array of Log prices
+ * @param int $product_fourn_price_id Id of supplier price
+ * @param string $sortfield Sort field
+ * @param string $sortorder Sort order
+ * @param int $limit Limit
+ * @param int $offset Offset
+ * @return array Array of Log prices
*/
- function listProductFournisseurPriceLog($fourn_id, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0)
+ function listProductFournisseurPriceLog($product_fourn_price_id, $sortfield = '', $sortorder = '', $limit = 0, $offset = 0)
{
global $conf;
@@ -902,7 +934,7 @@ class ProductFournisseur extends Product
$sql.= " WHERE pfp.entity IN (".getEntity('productprice').")";
$sql.= " AND pfpl.fk_user = u.rowid";
$sql.= " AND pfp.rowid = pfpl.fk_product_fournisseur";
- $sql.= " AND pfpl.fk_product_fournisseur = ".$fourn_id;
+ $sql.= " AND pfpl.fk_product_fournisseur = ".$product_fourn_price_id;
if (empty($sortfield)) $sql.= " ORDER BY pfpl.datec";
else $sql.= $this->db->order($sortfield, $sortorder);
$sql.=$this->db->plimit($limit, $offset);
diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php
index b7d4cb8f32f..458343afbb0 100644
--- a/htdocs/takepos/takepos.php
+++ b/htdocs/takepos/takepos.php
@@ -63,8 +63,25 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
get_full_arbo('product');
+
+$maincategories = array_filter($categories, function ($item) {
+ if (($item['level']==1) !== false) {
+ return true;
+ }
+ return false;
+});
+
+$subcategories = array_filter($categories, function ($item) {
+ if (($item['level']!=1) !== false) {
+ return true;
+ }
+ return false;
+});
?>
+
var categories = ;
+var subcategories = ;
+
var currentcat;
var pageproducts=0;
var pagecategories=0;
@@ -109,15 +126,27 @@ function MoreCategories(moreorless){
}
}
-function LoadProducts(position){
+function LoadProducts(position, issubcat=false){
$('#catimg'+position).animate({opacity: '0.5'}, 1);
$('#catimg'+position).animate({opacity: '1'}, 100);
- currentcat=$('#catdiv'+position).data('rowid');
+ if (issubcat==true) currentcat=$('#prodiv'+position).data('rowid');
+ else currentcat=$('#catdiv'+position).data('rowid');
if (currentcat=="") return;
pageproducts=0;
+ ishow=0; //product to show counter
+
+ jQuery.each(subcategories, function(i, val) {
+ if (currentcat==val.fk_parent){
+ $("#prodesc"+ishow).text(val.label);
+ $("#proimg"+ishow).attr("src","genimg/?query=cat&w=55&h=50&id="+val.rowid);
+ $("#prodiv"+ishow).data("rowid",val.rowid);
+ $("#prodiv"+ishow).data("iscat",1);
+ ishow++;
+ }
+ });
+
+ idata=0; //product data counter
$.getJSON('./ajax.php?action=getProducts&category='+currentcat, function(data) {
- idata=0; //product data counter
- ishow=0; //product to show counter
while (idata < 30) {
if (typeof (data[idata]) == "undefined") {
$("#prodesc"+ishow).text("");
@@ -130,6 +159,7 @@ function LoadProducts(position){
$("#prodesc"+ishow).text(data[parseInt(idata)]['label']);
$("#proimg"+ishow).attr("src","genimg/?query=pro&w=55&h=50&id="+data[idata]['id']);
$("#prodiv"+ishow).data("rowid",data[idata]['id']);
+ $("#prodiv"+ishow).data("iscat",0);
ishow++; //Next product to show after print data product
}
idata++; //Next data everytime
@@ -168,6 +198,7 @@ function MoreProducts(moreorless){
$("#prodesc"+ishow).text(data[parseInt(idata)]['label']);
$("#proimg"+ishow).attr("src","genimg/?query=pro&w=55&h=50&id="+data[idata]['id']);
$("#prodiv"+ishow).data("rowid",data[idata]['id']);
+ $("#prodiv"+ishow).data("iscat",0);
ishow++; //Next product to show after print data product
}
idata++; //Next data everytime
@@ -178,12 +209,16 @@ function MoreProducts(moreorless){
function ClickProduct(position){
$('#proimg'+position).animate({opacity: '0.5'}, 1);
$('#proimg'+position).animate({opacity: '1'}, 100);
- idproduct=$('#prodiv'+position).data('rowid');
- if (idproduct=="") return;
- $("#poslines").load("invoice.php?action=addline&place="+place+"&idproduct="+idproduct, function() {
- $('#poslines').scrollTop($('#poslines')[0].scrollHeight);
- });
-
+ if ($('#prodiv'+position).data('iscat')==1){
+ LoadProducts(position, true);
+ }
+ else{
+ idproduct=$('#prodiv'+position).data('rowid');
+ if (idproduct=="") return;
+ $("#poslines").load("invoice.php?action=addline&place="+place+"&idproduct="+idproduct, function() {
+ $('#poslines').scrollTop($('#poslines')[0].scrollHeight);
+ });
+ }
}
function deleteline(){
@@ -233,6 +268,7 @@ function Search2(){
$("#prodesc"+i).text(data[parseInt(i)]['label']);
$("#proimg"+i).attr("src","genimg/?query=pro&w=55&h=50&id="+data[i]['rowid']);
$("#prodiv"+i).data("rowid",data[i]['rowid']);
+ $("#prodiv"+ishow).data("iscat",0);
}
});
}
@@ -446,7 +482,7 @@ foreach($menus as $menu) {
while ($count<16)
{
?>
- id='catdiv'>
+
id='catdiv'>
width="98%" id='catimg'/>