diff --git a/.editorconfig b/.editorconfig
index 143f0739505..5b3e0d6a8df 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,14 +8,10 @@ charset = utf-8
end_of_line = lf
insert_final_newline = true
[*.php]
-indent_style = space
-indent_size = 4
+indent_style = tab
[*.js]
-indent_style = space
-indent_size = 2
+indent_style = tab
[*.css]
-indent_style = space
-indent_size = 2
+indent_style = tab
[*.xml]
-indent_style = space
-indent_size = 4
+indent_style = tab
diff --git a/COPYRIGHT b/COPYRIGHT
index e4bd78e7bbf..3c7cb5bf1cf 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -18,6 +18,7 @@ CKEditor 4.3.3 LGPL-2.1+ Yes
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
+PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.6 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php
new file mode 100644
index 00000000000..17dab085259
--- /dev/null
+++ b/dev/translation/sanity_check_en_langfiles.php
@@ -0,0 +1,60 @@
+
+*
+* 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 2 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 .
+*/
+
+// directory containing the english lang files
+$workdir = "../../htdocs/langs/en_US/";
+
+$files = scandir($workdir);
+$exludefiles = array('.','..','README');
+$files = array_diff($files,$exludefiles);
+$langstrings_3d = array();
+$langstrings_full = array();
+foreach ($files AS $file) {
+ $path_file = pathinfo($file);
+ // we're only interested in .lang files
+ if ($path_file['extension']=='lang') {
+ $content = file($workdir.$file);
+ foreach ($content AS $line => $row) {
+ // don't want comment lines
+ if (substr($row,0,1) !== '#') {
+ // don't want lines without the separator (why should those even be here, anyway...)
+ if (strpos($row,'=')!==false) {
+ $row_array = explode('=',$row);
+ $langstrings_3d[$path_file['basename']][$line+1]=$row_array[0];
+ $langstrings_full[]=$row_array[0];
+ }
+ }
+ }
+ }
+}
+
+foreach ($langstrings_3d AS $filename => $file) {
+ foreach ($file AS $linenum => $value) {
+ $keys = array_keys($langstrings_full, $value);
+ if (count($keys)>1) {
+ foreach ($keys AS $key) {
+ $dups[$value][$filename][$linenum] = '';
+ }
+ }
+ }
+}
+
+echo "
Duplicate strings in lang files in $workdir ";
+echo "";
+print_r($dups);
+
+?>
\ No newline at end of file
diff --git a/htdocs/adherents/admin/public.php b/htdocs/adherents/admin/public.php
index 0f92e017437..19fce918a31 100644
--- a/htdocs/adherents/admin/public.php
+++ b/htdocs/adherents/admin/public.php
@@ -164,7 +164,7 @@ print ' ';
print '';
print $langs->trans("DefaultAmount");
print ' ';
-print ' ';;
+print ' ';
print " \n";
// Can edit
@@ -197,7 +197,7 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
print '';
print $langs->trans("MEMBER_PAYONLINE_SENDEMAIL");
print ' ';
- print ' ';;
+ print ' ';
print " \n";
}
diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index 6aa9e074ff6..0fe6366ae58 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -249,7 +249,7 @@ if (empty($reshook))
}
$lastname=$_POST["lastname"];
$firstname=$_POST["firstname"];
- $morphy=$morphy=$_POST["morphy"];;
+ $morphy=$morphy=$_POST["morphy"];
if ($morphy != 'mor' && empty($lastname)) {
$error++;
$langs->load("errors");
diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php
index 83dc71d5403..b9b2d18d512 100644
--- a/htdocs/admin/company.php
+++ b/htdocs/admin/company.php
@@ -369,7 +369,7 @@ if ($action == 'edit' || $action == 'updateedit')
// Logo
$var=!$var;
print ''.$langs->trans("Logo").' (png,jpg) ';
- print '';
+ print '';
print ' ';
print ' ';
if (! empty($mysoc->logo_mini))
@@ -754,7 +754,7 @@ else
$var=!$var;
print ' '.$langs->trans("Logo").' ';
- print '';
+ print '';
print $mysoc->logo;
print ' ';
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 8de52ef73c5..167b38562ad 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -913,7 +913,7 @@ if ($id)
print " ";
$colspan=count($fieldlist)+2;
- if ($id == 4) $colspan++;;
+ if ($id == 4) $colspan++;
if (! empty($alabelisused)) // Si un des champs est un libelle
{
diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php
index 7be283528b4..4739a55e2c8 100644
--- a/htdocs/cashdesk/admin/cashdesk.php
+++ b/htdocs/cashdesk/admin/cashdesk.php
@@ -164,7 +164,7 @@ if (! empty($conf->service->enabled))
$var=! $var;
print '';
print $langs->trans("CashdeskShowServices");
- print ' ';;
+ print ' ';
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
print " \n";
}
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index 4303c593f1a..88aea468eab 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -1164,7 +1164,7 @@ class Categorie extends CommonObject
{
$cats = array();
- $typeid=-1; $table='';;
+ $typeid=-1; $table='';
if ($type == '0' || $type == 'product') { $typeid=0; $table='product'; $type='product'; }
else if ($type == '1' || $type == 'supplier') { $typeid=1; $table='soc'; $type='fournisseur'; }
else if ($type == '2' || $type == 'customer') { $typeid=2; $table='soc'; $type='societe'; }
diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php
index 3a3b283f8e9..3e6abe98b2d 100644
--- a/htdocs/comm/askpricesupplier/card.php
+++ b/htdocs/comm/askpricesupplier/card.php
@@ -1730,6 +1730,9 @@ if ($action == 'create')
/*
* Action presend
*/
+ if (!empty(GETPOST('modelselected'))) {
+ $action = 'presend';
+ }
if ($action == 'presend')
{
$object->fetch_projet();
@@ -1802,6 +1805,7 @@ if ($action == 'create')
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'askpricesupplier_send';
+ $formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['id'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 27d958914a2..81e8b396963 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -155,7 +155,7 @@ if (empty($reshook))
if ($action == 'setoutstanding_limit')
{
$object->fetch($id);
- $object->outstanding_limit=GETPOST('setoutstanding_limit');
+ $object->outstanding_limit=GETPOST('outstanding_limit');
$result=$object->set_OutstandingBill($user);
if ($result < 0) setEventMessage($object->error,'errors');
}
@@ -406,9 +406,15 @@ if ($id > 0)
$limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
// display amount and link to unpaid bill
- $outstandigBills = $object->get_OutstandingBill();
- if ($outstandigBills != 0)
- print " (".$langs->trans("CurrentOutstandingBill")." ".price($outstandigBills, '', $langs, 0, 0, -1, $conf->currency).' )';
+ $outstandingBills = $object->get_OutstandingBill();
+ if ($outstandingBills != 0) {
+ print ' ('.$langs->trans("CurrentOutstandingBill");
+ print ' ';
+ print price($outstandingBills, '', $langs, 0, -1, -1, $conf->currency);
+ print ' ';
+ if ($outstandingBills > $object->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
+ print ')';
+ }
print '';
print '';
}
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 2a845f1e6e1..6705752e71e 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -579,6 +579,103 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
}
}
+/*
+ * Opened Order
+ */
+if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
+{
+ $langs->load("order");
+
+ $sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total as total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv ";
+ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
+ $sql.= ", ".MAIN_DB_PREFIX."commande as c";
+ if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
+ $sql.= " WHERE c.fk_soc = s.rowid";
+ $sql.= " AND c.entity = ".$conf->entity;
+ $sql.= " AND c.fk_statut = 1";
+ if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
+ if ($socid) $sql.= " AND s.rowid = ".$socid;
+ $sql.= " ORDER BY c.rowid DESC";
+
+ $result=$db->query($sql);
+ if ($result)
+ {
+ $total = 0;
+ $num = $db->num_rows($result);
+ $i = 0;
+ if ($num > 0)
+ {
+ $var=true;
+
+ print '';
+ print ''.$langs->trans("OrdersOpened").' '.$num.' ';
+
+ $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD));
+ while ($i < $nbofloop)
+ {
+ $obj = $db->fetch_object($result);
+ $var=!$var;
+ print '';
+
+ // Ref
+ print '';
+
+ $orderstatic->id=$obj->commandeid;
+ $orderstatic->ref=$obj->ref;
+ $orderstatic->ref_client=$obj->ref_client;
+ $orderstatic->total_ht = $obj->total_ht;
+ $orderstatic->total_tva = $obj->total_tva;
+ $orderstatic->total_ttc = $obj->total_ttc;
+
+ print '';
+ print '';
+ print $orderstatic->getNomUrl(1);
+ print ' ';
+ print '';
+ //if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late"));
+ print ' ';
+ print '';
+ $filename=dol_sanitizeFileName($obj->ref);
+ $filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
+ $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
+ print $formfile->getDocumentsLink($orderstatic->element, $filename, $filedir);
+ print '
';
+
+ print " ";
+
+ print '';
+ $companystatic->id=$obj->rowid;
+ $companystatic->name=$obj->name;
+ $companystatic->client=$obj->client;
+ $companystatic->canvas=$obj->canvas;
+ print $companystatic->getNomUrl(1, 'company', 44);
+ print ' ';
+ print '';
+ print dol_print_date($db->jdate($obj->dp),'day').' '."\n";
+ print ''.price($obj->total_ttc).' ';
+ print ''.$orderstatic->LibStatut($obj->fk_statut,3).' '."\n";
+ print ' '."\n";
+ $i++;
+ $total += $obj->total_ttc;
+ }
+ if ($num > $nbofloop)
+ {
+ print ''.$langs->trans("XMoreLines", ($num - $nbofloop))." ";
+ }
+ else if ($total>0)
+ {
+ print ''.$langs->trans("Total")." ".price($total)." ";
+ }
+ print "
";
+ }
+ }
+ else
+ {
+ dol_print_error($db);
+ }
+}
+
+
print '';
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index f0a4b6f1f79..e6876637dcf 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -2307,6 +2307,10 @@ if ($action == 'create')
/*
* Action presend
*/
+ //Select mail models is same action as presend
+ if (!empty(GETPOST('modelselected'))) {
+ $action = 'presend';
+ }
if ($action == 'presend')
{
$object->fetch_projet();
@@ -2401,6 +2405,7 @@ if ($action == 'create')
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'propal_send';
+ $formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['id'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 294445705ed..0ffb3807467 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2396,6 +2396,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'order_send';
+ $formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['orderid'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 6f207b198cf..c89f45d0d2c 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -379,7 +379,7 @@ else
elseif ($links[$key]['type']=='payment_supplier')
{
$paymentsupplierstatic->id=$links[$key]['url_id'];
- $paymentsupplierstatic->ref=$langs->trans("Payment");;
+ $paymentsupplierstatic->ref=$langs->trans("Payment");
print ' '.$paymentsupplierstatic->getNomUrl(1);
$newline=0;
}
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 4d8ed6007e3..01df11a61ab 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -1966,12 +1966,12 @@ if ($action == 'create')
print $soc->getNomUrl(1);
print ' ';
// Outstanding Bill
- $outstandigBills = $soc->get_OutstandingBill();
+ $outstandingBills = $soc->get_OutstandingBill();
print ' (' . $langs->trans('CurrentOutstandingBill') . ': ';
- print price($outstandigBills, '', $langs, 0, 0, -1, $conf->currency);
+ print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency);
if ($soc->outstanding_limit != '')
{
- if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
+ if ($outstandingBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
print ' / ' . price($soc->outstanding_limit, '', $langs, 0, 0, -1, $conf->currency);
}
print ')';
@@ -2832,11 +2832,11 @@ if ($action == 'create')
print ' ';
print '(' . $langs->trans('OtherBills') . ' ';
// Outstanding Bill
- $outstandigBills = $soc->get_OutstandingBill();
+ $outstandingBills = $soc->get_OutstandingBill();
print ' - ' . $langs->trans('CurrentOutstandingBill') . ': ';
- print price($outstandigBills, '', $langs, 0, 0, - 1, $conf->currency);
+ print price($outstandingBills, '', $langs, 0, 0, - 1, $conf->currency);
if ($soc->outstanding_limit != '') {
- if ($outstandigBills > $soc->outstanding_limit)
+ if ($outstandingBills > $soc->outstanding_limit)
print img_warning($langs->trans("OutstandingBillReached"));
print ' / ' . price($soc->outstanding_limit);
}
@@ -3733,6 +3733,10 @@ if ($action == 'create')
}
print ' ';
+ //Select mail models is same action as presend
+ if (!empty(GETPOST('modelselected'))) {
+ $action = 'presend';
+ }
if ($action != 'prerelance' && $action != 'presend')
{
print '';
@@ -3953,6 +3957,7 @@ if ($action == 'create')
// Tableau des parametres complementaires du post
$formmail->param['action'] = $action;
$formmail->param['models'] = $modelmail;
+ $formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['facid'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php
index dfa1207e423..efe16af1fb9 100644
--- a/htdocs/compta/facture/mergepdftool.php
+++ b/htdocs/compta/facture/mergepdftool.php
@@ -530,6 +530,9 @@ if ($resql)
print '
';
-
+
print '';
$modulepart = 'produit';
$permission = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer));
$param = '&id=' . $object->id;
include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
+
+
+ //Merge propal PDF docuemnt PDF files
+ if (!empty($conf->global->PRODUIT_PDF_MERGE_PROPAL))
+ {
+ $filetomerge = new Propalmergepdfproduct($db);
+
+ if ($conf->global->MAIN_MULTILANGS) {
+ $lang_id = GETPOST('lang_id');
+ $result = $filetomerge->fetch_by_product($object->id, $lang_id);
+ } else {
+ $result = $filetomerge->fetch_by_product($object->id);
+ }
+
+ $form = new Form($db);
+
+ $filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1);
+
+ // For each file build select list with PDF extention
+ if (count($filearray) > 0) {
+ print ' ';
+ // Actual file to merge is :
+ if (count($filetomerge->lines) > 0) {
+ print $langs->trans('PropalMergePdfProductActualFile');
+ }
+
+ print '';
+ print ' ';
+ print ' ';
+ if (count($filetomerge->lines) == 0) {
+ print $langs->trans('PropalMergePdfProductChooseFile');
+ }
+
+ print '';
+
+ // Get language
+ if ($conf->global->MAIN_MULTILANGS) {
+
+ $langs->load("languages");
+
+ print '';
+
+ $delauft_lang = (empty($lang_id)) ? $langs->getDefaultLang() : $lang_id;
+
+ $langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 12);
+
+ print '';
+
+ asort($langs_available);
+
+ $uncompletelanguages = array (
+ 'da_DA',
+ 'fi_FI',
+ 'hu_HU',
+ 'is_IS',
+ 'pl_PL',
+ 'ro_RO',
+ 'ru_RU',
+ 'sv_SV',
+ 'tr_TR',
+ 'zh_CN'
+ );
+ foreach ( $langs_available as $key => $value ) {
+ if ($showwarning && in_array($key, $uncompletelanguages)) {
+ // $value.=' - '.$langs->trans("TranslationUncomplete",$key);
+ }
+ if ($filter && is_array($filter)) {
+ if (! array_key_exists($key, $filter)) {
+ print '' . $value . ' ';
+ }
+ } else if ($delauft_lang == $key) {
+ print '' . $value . ' ';
+ } else {
+ print '' . $value . ' ';
+ }
+ }
+ print ' ';
+
+ if ($conf->global->MAIN_MULTILANGS) {
+ print ' ';
+ }
+
+ print ' ';
+ }
+
+ $style = 'impair';
+ foreach ( $filearray as $filetoadd ) {
+
+ if ($ext = pathinfo($filetoadd['name'], PATHINFO_EXTENSION) == 'pdf') {
+
+ if ($style == 'pair') {
+ $style = 'impair';
+ } else {
+ $style = 'pair';
+ }
+
+ $checked = '';
+ $filename = $filetoadd['name'];
+
+ if ($conf->global->MAIN_MULTILANGS) {
+ if (array_key_exists($filetoadd['name'] . '_' . $delauft_lang, $filetomerge->lines)) {
+ $filename = $filetoadd['name'] . ' - ' . $langs->trans('Language_' . $delauft_lang);
+ $checked = ' checked="checked" ';
+ }
+ } else {
+ if (array_key_exists($filetoadd['name'], $filetomerge->lines)) {
+ $checked = ' checked="checked" ';
+ }
+ }
+
+ print '';
+
+ print ' ' . $filename . '';
+ print ' ';
+ }
+ }
+ print '';
+
+ print ' ';
+ print ' ';
+ print '
';
+
+ print ' ';
+ }
+ }
+
}
else
{
@@ -157,4 +347,4 @@ else
llxFooter();
-$db->close();
+$db->close();
\ No newline at end of file
diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php
index 6f5cb7ae578..871ec4d30f1 100644
--- a/htdocs/product/stock/valo.php
+++ b/htdocs/product/stock/valo.php
@@ -31,7 +31,7 @@ $langs->load("stocks");
// Security check
$result=restrictedArea($user,'stock');
-$sref=GETPOST("sref");;
+$sref=GETPOST("sref");
$snom=GETPOST("snom");
$sall=GETPOST("sall");
diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php
index 583326b3e34..f501f25c866 100644
--- a/htdocs/projet/note.php
+++ b/htdocs/projet/note.php
@@ -129,7 +129,7 @@ if ($id > 0 || ! empty($ref))
$colwidth=30;
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
- dol_fiche_end();;
+ dol_fiche_end();
}
llxFooter();
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index d50c9a4ec6f..6b6b5553d72 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -59,7 +59,7 @@ $hookmanager->initHooks(array('element_resource'));
$object->available_resources = array('resource');
// Get parameters
-$id = GETPOST('id','int');
+$id = GETPOST('id','int');
$action = GETPOST('action','alpha');
$mode = GETPOST('mode','alpha');
$lineid = GETPOST('lineid','int');
@@ -70,6 +70,7 @@ $resource_type = GETPOST('resource_type','alpha');
$busy = GETPOST('busy','int');
$mandatory = GETPOST('mandatory','int');
$cancel = GETPOST('cancel','alpha');
+$confirm = GETPOST('confirm','alpha');
if($action == 'add_element_resource' && ! $cancel)
{
@@ -113,22 +114,22 @@ if ($action == 'update_linked_resource' && $user->rights->resource->write && !GE
}
// Delete a resource linked to an element
-if ($action == 'confirm_delete_linked_resource' && $user->rights->resource->delete && GETPOST('confirm') == 'yes')
+if ($action == 'confirm_delete_linked_resource' && $user->rights->resource->delete && $confirm === 'yes')
{
- $res = $object->fetch(GETPOST('id'));
- if($res)
+ $res = $object->fetch($id);
+ if($res > 0)
{
- $result = $object->delete_resource($lineid,$element);
+ $result = $object->delete_resource($lineid,$element);
- if ($result >= 0)
- {
- setEventMessage($langs->trans('RessourceLineSuccessfullyDeleted'));
- Header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id);
- exit;
- }
- else {
- setEventMessage($object->error,'errors');
- }
+ if ($result >= 0)
+ {
+ setEventMessage($langs->trans('RessourceLineSuccessfullyDeleted'));
+ Header("Location: ".$_SERVER['PHP_SELF']."?element=".$element."&element_id=".$element_id);
+ exit;
+ }
+ else {
+ setEventMessage($object->error,'errors');
+ }
}
else
{
@@ -173,7 +174,7 @@ else
// Confirmation suppression resource line
if ($action == 'delete_resource')
{
- print $form->formconfirm("element_resource.php?element=".$element."&element_id=".$element_id."&lineid=".$lineid,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResourceElement"),"confirm_delete_linked_resource",'','',1);
+ print $form->formconfirm("element_resource.php?element=".$element."&element_id=".$element_id."&id=".$id."&lineid=".$lineid,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResourceElement"),"confirm_delete_linked_resource",'','',1);
}
diff --git a/htdocs/societe/canvas/company/tpl/card_view.tpl.php b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
index 4ea5afcbdcb..26c1e77742f 100644
--- a/htdocs/societe/canvas/company/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/company/tpl/card_view.tpl.php
@@ -107,7 +107,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
trans('EMail'); ?>
- control->tpl['email'];; ?>
+ control->tpl['email']; ?>
trans('Web'); ?>
control->tpl['url']; ?>
diff --git a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
index d2fc7e5551b..bc83f2955da 100644
--- a/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
+++ b/htdocs/societe/canvas/individual/tpl/card_view.tpl.php
@@ -106,7 +106,7 @@ dol_fiche_head($head, 'card', $langs->trans("ThirdParty"),0,'company');
trans('EMail'); ?>
- control->tpl['email'];; ?>
+ control->tpl['email']; ?>
trans('Web'); ?>
control->tpl['url']; ?>
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index 8b8f3755fff..6eb8b823184 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -1,7 +1,7 @@
* Copyright (C) 2004-2014 Laurent Destailleur
- * Copyright (C) 2013 Juanjo Menent
+ * Copyright (C) 2013-2015 Juanjo Menent
*
* Version V1.1 Initial version of Philippe Berthet
* Version V2 Change to be compatible with 3.4 and enhanced to be more generic
@@ -75,6 +75,7 @@ $langs->load("bills");
$langs->load("orders");
$langs->load("suppliers");
$langs->load("propal");
+$langs->load("interventions");
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('consumptionthirdparty'));
@@ -98,7 +99,7 @@ $form = new Form($db);
$formother = new FormOther($db);
$productstatic=new Product($db);
-$title = $langs->trans("Referer",$object->name);
+$title = $langs->trans("Referers",$object->name);
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title;
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$title,$help_url);
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 43b04ce3a94..a2c56c014a7 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -2271,7 +2271,7 @@ else
print ''."\n";
//Select mail models is same action as presend
- if (!empty(GETPOST('modelselected'))) {
+ if (GETPOST('modelselected')) {
$action = 'presend';
}
if ($action == 'presend')
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 6f17f10113a..35b63230e1f 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -255,8 +255,9 @@ textarea.cke_source:focus
input, input.flat, textarea, textarea.flat, form.flat select, select.flat {
font-size: px;
- font-family: ;
- background: #FDFDFD;
+ font-family: ;
+ background: #FDFDFD;
+ color: #444;
border: 1px solid #C0C0C0;
/*padding: 1px 1px 1px 1px; */
margin: 0px 0px 0px 0px;
@@ -1778,11 +1779,11 @@ table.noborder tr, div.noborder form {
border-left-width: 1px;
border-left-color: #BBBBBB;
border-left-style: solid;
- height: 26px;
+ min-height: 20px;
}
table.noborder th, table.noborder td, div.noborder form, div.noborder form div {
- padding: 1px 2px 1px 3px; /* t r b l */
+ padding: 5px 2px 5px 3px; /* t r b l */
}
table.nobordernopadding {
@@ -1917,7 +1918,7 @@ table.liste td {
background-color: #f9f9f9;
}
tr.pair td, tr.impair td {
- padding: 2px;
+ padding: 5px 2px;
border-bottom: 1px solid #ddd;
}
div.liste_titre .tagtd {
diff --git a/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN b/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN
index 1e14c07a5bf..d3044fc9bd8 100755
--- a/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN
+++ b/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN
@@ -160,6 +160,6 @@ echo '';
echo 'SOAP Message ';
echo '' . htmlspecialchars($soapclient->response, ENT_QUOTES) . ' ';
-echo '