diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 0a34a4d4c47..f43c9f8b244 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -40,14 +40,14 @@ $action = GETPOST('action','alpha'); * Actions */ -if ($action == 'setMAILING_EMAIL_UNSUBSCRIBE') -{ - $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",1,'chaine',0,'',$conf->entity); -} -if ($action == 'unsetMAILING_EMAIL_UNSUBSCRIBE') -{ - $res=dolibarr_del_const($db, "MAILING_EMAIL_UNSUBSCRIBE"); -} +if ($action == 'setMAILING_EMAIL_UNSUBSCRIBE') +{ + $res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE",1,'chaine',0,'',$conf->entity); +} +if ($action == 'unsetMAILING_EMAIL_UNSUBSCRIBE') +{ + $res=dolibarr_del_const($db, "MAILING_EMAIL_UNSUBSCRIBE"); +} if ($action == 'setvalue') { diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 7618334aa86..af408cef79d 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -339,7 +339,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes') } else { - setEventMessage($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo")); + setEventMessage($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo")); } // Loop finished, set global statut of mail diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index 12f0bd36978..cf042bccc49 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -31,10 +31,10 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't nee //if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); //if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; -$langs->load('compta'); +$langs->load('compta'); /* @@ -51,20 +51,20 @@ $currentInvId = $_POST['imgClicked']; // from DOM elements : imgId (equals invo // from text inputs : total amount $amountPayment = $amountPayment!='' ? ( is_numeric(price2num($amountPayment)) ? price2num($amountPayment) : '' ) : ''; // keep void if not a valid entry -// Clean checkamounts -foreach ($amounts as $key => $value) -{ - $value = price2num($value); - $amounts[$key]=$value; - if (empty($value)) unset($amounts[$key]); -} -// Clean remains -foreach ($remains as $key => $value) -{ - $value = price2num($value); - $remains[$key]=$value; - if (empty($value)) unset($remains[$key]); -} +// Clean checkamounts +foreach ($amounts as $key => $value) +{ + $value = price2num($value); + $amounts[$key]=$value; + if (empty($value)) unset($amounts[$key]); +} +// Clean remains +foreach ($remains as $key => $value) +{ + $value = price2num($value); + $remains[$key]=$value; + if (empty($value)) unset($remains[$key]); +} // Treatment $result = $amountPayment != '' ? ($amountPayment - array_sum($amounts)) : ($amountPayment + array_sum($amounts)); // Remaining amountPayment @@ -111,8 +111,8 @@ if ($currentInvId) // Here to breakdown } $toJsonArray['makeRed'] = ($totalRemaining < price2num($result) || price2num($result) < 0) ? true : false; -$toJsonArray['result'] = price($result); // Return value to user format -$toJsonArray['resultnum'] = price2num($result); // Return value to numeric format +$toJsonArray['result'] = price($result); // Return value to user format +$toJsonArray['resultnum'] = price2num($result); // Return value to numeric format // Encode to JSON to return echo dol_json_encode($toJsonArray); // Printing the call's result diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 39414b0960d..0f12ab0cfc8 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1184,7 +1184,7 @@ class BonPrelevement extends CommonObject { if (! empty($conf->esaeb->enabled)) { - dol_include_once('/esaeb/class/esaeb19.class.php'); + dol_include_once('/esaeb/class/esaeb19.class.php'); //Head $esaeb19 = new AEB19DocWritter; diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index a6f6d717c94..76396dfee7e 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -74,7 +74,7 @@ class modExpedition extends DolibarrModules $this->depends = array("modCommande"); $this->requiredby = array(); $this->conflictwith = array(); - $this->langfiles = array('deliveries','sendings'); + $this->langfiles = array('deliveries','sendings'); // Constantes $this->const = array(); @@ -192,25 +192,25 @@ class modExpedition extends DolibarrModules $this->rights[$r][4] = 'livraison'; $this->rights[$r][5] = 'supprimer'; - // Exports - //-------- - $r=0; - - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='Shipments'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("expedition","shipment","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); - $this->export_dependencies_array[$r]=array('shipment_line'=>'ed.rowid','product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them - - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'expedition as c, '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'expeditiondet as ed, '.MAIN_DB_PREFIX.'commandedet as cd)'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)'; - $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_expedition AND ed.fk_origin_line = cd.rowid'; - $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; + // Exports + //-------- + $r=0; + + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='Shipments'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r]=array(array("expedition","shipment","export")); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_customer'=>"RefCustomer",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_delivery'=>"DateSending",'c.tracking_number'=>"TrackingNumber",'c.height'=>"Height",'c.width'=>"Width",'c.size'=>"Depth",'c.size_units'=>'SizeUnits','c.weight'=>"Weight",'c.weight_units'=>"WeightUnits",'c.fk_statut'=>'Status','c.note'=>"Note",'ed.rowid'=>'LineId','cd.description'=>'Description','ed.qty'=>"Qty",'p.rowid'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_client'=>"Text",'c.date_creation'=>"Date",'c.date_commande'=>"Date",'c.amount_ht'=>"Number",'c.remise_percent'=>"Number",'c.total_ht'=>"Number",'c.total_ttc'=>"Number",'c.facture'=>"Boolean",'c.fk_statut'=>'Status','c.note'=>"Text",'c.date_livraison'=>'Date','ed.qty'=>"Text"); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','s.libelle'=>'List:c_pays:libelle:rowid','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','c.ref'=>"Text",'c.ref_customer'=>"Text",'c.date_creation'=>"Date",'c.date_delivery'=>"Date",'c.tracking_number'=>"Number",'c.height'=>"Number",'c.width'=>"Number",'c.weight'=>"Number",'c.fk_statut'=>'Status','c.note'=>"Text",'ed.qty'=>"Number"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.siret'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','c.rowid'=>"shipment",'c.ref'=>"shipment",'c.ref_customer'=>"shipment",'c.fk_soc'=>"shipment",'c.date_creation'=>"shipment",'c.date_delivery'=>"shipment",'c.tracking_number'=>'shipment','c.height'=>"shipment",'c.width'=>"shipment",'c.size'=>'shipment','c.size_units'=>'shipment','c.weight'=>"shipment",'c.weight_units'=>'shipment','c.fk_statut'=>"shipment",'c.note'=>"shipment",'ed.rowid'=>'shipment_line','cd.description'=>'shipment_line','ed.qty'=>"shipment_line",'p.rowid'=>'product','p.ref'=>'product','p.label'=>'product'); + $this->export_dependencies_array[$r]=array('shipment_line'=>'ed.rowid','product'=>'ed.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them + + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'expedition as c, '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'expeditiondet as ed, '.MAIN_DB_PREFIX.'commandedet as cd)'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)'; + $this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_expedition AND ed.fk_origin_line = cd.rowid'; + $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; } diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 0942eb17b4d..7624436b34e 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -65,8 +65,8 @@ class modProjet extends DolibarrModules // Dependancies $this->depends = array(); $this->requiredby = array(); - $this->conflictwith = array(); - $this->langfiles = array('projects'); + $this->conflictwith = array(); + $this->langfiles = array('projects'); // Constants $this->const = array(); diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index ba796d174c4..d3cd793891d 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1117,7 +1117,7 @@ else print ''; $object->fetch_delivery_methods(); print $form->selectarray("expedition_method_id",$object->meths,$object->expedition_method_id,1,0,0,"",1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print ''; print ''; } diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 81390c9f0b0..865705f7493 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1591,27 +1591,27 @@ class Holiday extends CommonObject } } - /** - * Initialise an instance with random values. - * Used to build previews or test instances. - * id must be 0 if object instance is a specimen. - * - * @return void - */ - function initAsSpecimen() - { - global $user,$langs; - - // Initialise parameters - $this->id=0; + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @return void + */ + function initAsSpecimen() + { + global $user,$langs; + + // Initialise parameters + $this->id=0; $this->specimen=1; - $this->fk_user=1; - $this->description='SPECIMEN description'; - $this->date_debut=dol_now(); - $this->date_fin=dol_now()+(24*3600); + $this->fk_user=1; + $this->description='SPECIMEN description'; + $this->date_debut=dol_now(); + $this->date_fin=dol_now()+(24*3600); $this->fk_validator=1; - } + } } ?> diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/fiche.php index 43dba92b726..8f25af52a3b 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/fiche.php @@ -567,8 +567,8 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes') * View ****************************************************/ -$form = new Form($db); - +$form = new Form($db); + llxHeader(array(),$langs->trans('CPTitreMenu')); diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 0ad9962ac1e..151920e614f 100755 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -36,8 +36,8 @@ function llxHeaderPaypal($title, $head = "") header("Content-type: text/html; charset=".$conf->file->character_set_client); - $appli='Dolibarr'; - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE; + $appli='Dolibarr'; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE; print ''; //print '';