diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php
index 28968a849fc..b8776a8e98e 100644
--- a/htdocs/adherents/list.php
+++ b/htdocs/adherents/list.php
@@ -749,7 +749,8 @@ while ($i < min($num, $limit))
print '
';
print dol_print_date($datefin,'day');
if ($memberstatic->hasDelay()) {
- print " ".img_warning($langs->trans("SubscriptionLate"));
+ $textlate .= ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay/60/60/24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay/60/60/24).' '.$langs->trans("days").')';
+ print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
}
print ' | ';
}
diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php
index f18a3fe86b6..8e550f98c99 100644
--- a/htdocs/admin/external_rss.php
+++ b/htdocs/admin/external_rss.php
@@ -46,14 +46,17 @@ $action=GETPOST('action');
*/
// positionne la variable pour le nombre de rss externes
-$sql ="SELECT MAX(".$db->decrypt('name').") as name FROM ".MAIN_DB_PREFIX."const";
+$sql ="SELECT ".$db->decrypt('name')." as name FROM ".MAIN_DB_PREFIX."const";
$sql.=" WHERE ".$db->decrypt('name')." LIKE 'EXTERNAL_RSS_URLRSS_%'";
-$result=$db->query($sql);
+//print $sql;
+$result=$db->query($sql); // We can't use SELECT MAX() because EXTERNAL_RSS_URLRSS_10 is lower than EXTERNAL_RSS_URLRSS_9
if ($result)
{
- $obj = $db->fetch_object($result);
- preg_match('/([0-9]+)$/i',$obj->name,$reg);
- if ($reg[1]) $lastexternalrss = $reg[1];
+ while ($obj = $db->fetch_object($result))
+ {
+ preg_match('/([0-9]+)$/i',$obj->name,$reg);
+ if ($reg[1] && $reg[1] > $lastexternalrss) $lastexternalrss = $reg[1];
+ }
}
else
{
diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php
index e00de804f93..9e766e937e2 100644
--- a/htdocs/compta/prelevement/index.php
+++ b/htdocs/compta/prelevement/index.php
@@ -59,9 +59,7 @@ llxHeader('',$langs->trans("CustomersStandingOrdersArea"));
if (prelevement_check_config() < 0)
{
$langs->load("errors");
- print '';
- print $langs->trans("ErrorModuleSetupNotComplete");
- print '
';
+ setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors');
}
print load_fiche_titre($langs->trans("CustomersStandingOrdersArea"));
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index 84f61145de7..4d535851df2 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -61,7 +61,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 320__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 0, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && $conf->accounting->enabled', __HANDLER__, 'left', 321__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=admintools', 'InitAccountancy', 1, 'accountancy', '', '', 2, 0, __ENTITY__);
-- Home - Menu users and groups
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 07c349c3535..e16e6601940 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -579,12 +579,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
}
- if (! empty($conf->accounting->enabled))
- {
- $langs->load("accountancy");
- $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=admintools", $langs->trans("InitAccountancy"), 1, $user->admin);
- }
-
$newmenu->add("/support/index.php?mainmenu=home&leftmenu=admintools", $langs->trans("HelpCenter"),1,1,'targethelp');
}
diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php
index eec7cd174cd..63f7b536c1b 100644
--- a/htdocs/core/modules/modExpedition.class.php
+++ b/htdocs/core/modules/modExpedition.class.php
@@ -94,7 +94,7 @@ class modExpedition extends DolibarrModules
$this->const[$r][0] = "EXPEDITION_ADDON_NUMBER";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "mod_expedition_safor";
- $this->const[$r][3] = 'Nom du gestionnaire de numerotation des expeditions';
+ $this->const[$r][3] = 'Name for numbering manager for shipments';
$this->const[$r][4] = 0;
$r++;
diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php
index 4b56e6cab0e..8267df27f18 100644
--- a/htdocs/core/modules/modFacture.class.php
+++ b/htdocs/core/modules/modFacture.class.php
@@ -208,7 +208,7 @@ class modFacture extends DolibarrModules
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode');
//Add 'fd.label'=>"Label" to export_fields_array if you use it. Not used by dolibarr currently.
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
- $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text", 'pj.ref'=>'Text', 'fd.label'=>'Text', 'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
+ $this->export_TypeFields_array[$r]=array('s.rowid'=>'Numeric','s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>'Numeric','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Numeric','f.note_private'=>"Text",'f.note_public'=>"Text",'f.fk_user_author'=>'Numeric','uc.login'=>'Text','f.fk_user_valid'=>'Numeric','uv.login'=>'Text','pj.ref'=>'Text','fd.rowid'=>'Numeric','fd.label'=>'Text','fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice", 'pj.ref'=>'project', 'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra';
diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php
index ec257725369..93d0a46f457 100644
--- a/htdocs/expensereport/class/expensereport.class.php
+++ b/htdocs/expensereport/class/expensereport.class.php
@@ -2242,9 +2242,10 @@ function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempt
* @param int $selected Preselected type
* @param string $htmlname Name of field in form
* @param int $showempty Add an empty field
+ * @param int $active 1=Active only, 0=Unactive only, -1=All
* @return string Select html
*/
-function select_type_fees_id($selected='',$htmlname='type',$showempty=0)
+function select_type_fees_id($selected='',$htmlname='type',$showempty=0, $active=1)
{
global $db,$langs,$user;
$langs->load("trips");
@@ -2258,6 +2259,7 @@ function select_type_fees_id($selected='',$htmlname='type',$showempty=0)
}
$sql = "SELECT c.id, c.code, c.label as type FROM ".MAIN_DB_PREFIX."c_type_fees as c";
+ if ($active >= 0) $sql.= " WHERE c.active = ".$active;
$sql.= " ORDER BY c.label ASC";
$resql=$db->query($sql);
if ($resql)
diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php
index dfea6d4d17a..1d0c5cfb13e 100644
--- a/htdocs/exports/class/export.class.php
+++ b/htdocs/exports/class/export.class.php
@@ -288,15 +288,15 @@ class Export
{
// mode plage
$ValueArray = explode("+", $ValueField);
- $szFilterQuery ="(".$this->conditionDate($NameField,$ValueArray[0],">=");
- $szFilterQuery.=" AND ".$this->conditionDate($NameField,$ValueArray[1],"<=").")";
+ $szFilterQuery ="(".$this->conditionDate($NameField,trim($ValueArray[0]),">=");
+ $szFilterQuery.=" AND ".$this->conditionDate($NameField,trim($ValueArray[1]),"<=").")";
}
else
{
if (is_numeric(substr($ValueField,0,1)))
- $szFilterQuery=$this->conditionDate($NameField,$ValueField,"=");
+ $szFilterQuery=$this->conditionDate($NameField,trim($ValueField),"=");
else
- $szFilterQuery=$this->conditionDate($NameField,substr($ValueField,1),substr($ValueField,0,1));
+ $szFilterQuery=$this->conditionDate($NameField,trim(substr($ValueField,1)),substr($ValueField,0,1));
}
break;
case 'Duree':
diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php
index 01e963585ec..12f78e01ce9 100644
--- a/htdocs/exports/export.php
+++ b/htdocs/exports/export.php
@@ -595,7 +595,7 @@ if ($step == 2 && $datatoexport)
{
// Selected fields
print ' | ';
- print ''.img_left('default', 0, 'style="max-width: 20px"').' | ';
+ print ''.img_left('default', 0, 'style="max-width: 20px"').' | ';
print '';
//print $text.'-'.$htmltext." ";
print $form->textwithpicto($text,$htmltext);
@@ -610,7 +610,7 @@ if ($step == 2 && $datatoexport)
print $form->textwithpicto($text,$htmltext);
//print ' ('.$code.')';
print ' | ';
- print ''.img_right('default', 0, 'style="max-width: 20px"').' | ';
+ print ''.img_right('default', 0, 'style="max-width: 20px"').' | ';
print ' | ';
}
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 6c0d493373c..5602f573e90 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -46,7 +46,7 @@ class FactureFournisseur extends CommonInvoice
public $fk_element='fk_facture_fourn';
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto='bill';
-
+
/**
* {@inheritdoc}
*/
@@ -320,12 +320,12 @@ class FactureFournisseur extends CommonInvoice
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)';
$sql .= ' VALUES ('.$this->id.')';
-
+
$resql_insert=$this->db->query($sql);
if ($resql_insert)
{
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
-
+
$this->updateline(
$idligne,
$this->lines[$i]->description,
@@ -354,19 +354,19 @@ class FactureFournisseur extends CommonInvoice
foreach ($this->lines as $i => $val)
{
$line = $this->lines[$i];
-
+
// Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array
//if (! is_object($line)) $line=json_decode(json_encode($line), FALSE); // convert recursively array into object.
if (! is_object($line)) $line = (object) $line;
-
+
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)';
$sql .= ' VALUES ('.$this->id.')';
-
+
$resql_insert=$this->db->query($sql);
if ($resql_insert)
{
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
-
+
$this->updateline(
$idligne,
$line->description,
@@ -387,9 +387,9 @@ class FactureFournisseur extends CommonInvoice
$this->db->rollback();
return -5;
}
- }
+ }
}
-
+
// Update total price
$result=$this->update_price();
if ($result > 0)
@@ -413,7 +413,7 @@ class FactureFournisseur extends CommonInvoice
}
}
else if ($reshook < 0) $error++;
-
+
if (! $error)
{
// Call trigger
@@ -421,7 +421,7 @@ class FactureFournisseur extends CommonInvoice
if ($result < 0) $error++;
// End call triggers
}
-
+
if (! $error)
{
$this->db->commit();
@@ -587,7 +587,7 @@ class FactureFournisseur extends CommonInvoice
$this->multicurrency_total_ht = $obj->multicurrency_total_ht;
$this->multicurrency_total_tva = $obj->multicurrency_total_tva;
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
-
+
$this->extraparams = (array) json_decode($obj->extraparams, true);
$this->socid = $obj->socid;
@@ -671,8 +671,8 @@ class FactureFournisseur extends CommonInvoice
$line->subprice = $obj->pu_ht;
$line->pu_ht = $obj->pu_ht;
$line->pu_ttc = $obj->pu_ttc;
-
- $line->vat_src_code = $obj->vat_src_code;
+
+ $line->vat_src_code = $obj->vat_src_code;
$line->tva_tx = $obj->tva_tx;
$line->localtax1_tx = $obj->localtax1_tx;
$line->localtax2_tx = $obj->localtax2_tx;
@@ -700,7 +700,7 @@ class FactureFournisseur extends CommonInvoice
$line->multicurrency_total_ht = $obj->multicurrency_total_ht;
$line->multicurrency_total_tva = $obj->multicurrency_total_tva;
$line->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
-
+
$this->lines[$i] = $line;
$i++;
@@ -1260,7 +1260,7 @@ class FactureFournisseur extends CommonInvoice
if (! $error && empty($notrigger))
{
// Call trigger
- $result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user);
+ $result=$this->call_trigger('BILL_SUPPLIER_UNVALIDATE',$user);
if ($result < 0) $error++;
// End call triggers
}
@@ -1332,7 +1332,7 @@ class FactureFournisseur extends CommonInvoice
if (empty($txlocaltax2)) $txlocaltax2=0;
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty);
-
+
// Clean vat code
$vat_src_code='';
if (preg_match('/\((.*)\)/', $txtva, $reg))
@@ -1340,7 +1340,7 @@ class FactureFournisseur extends CommonInvoice
$vat_src_code = $reg[1];
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
}
-
+
$remise_percent=price2num($remise_percent);
$qty=price2num($qty);
$pu=price2num($pu);
@@ -1374,7 +1374,7 @@ class FactureFournisseur extends CommonInvoice
//$this->line->label=$label; // deprecated
$this->line->desc=$desc;
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
-
+
$this->line->vat_src_code=$vat_src_code;
$this->line->tva_tx=$txtva;
$this->line->localtax1_tx=$txlocaltax1;
@@ -1503,7 +1503,7 @@ class FactureFournisseur extends CommonInvoice
$vat_src_code = $reg[1];
$vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate.
}
-
+
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
$total_ht = $tabprice[0];
$total_tva = $tabprice[1];
@@ -1513,13 +1513,13 @@ class FactureFournisseur extends CommonInvoice
$pu_ttc = $tabprice[5];
$total_localtax1 = $tabprice[9];
$total_localtax2 = $tabprice[10];
-
+
// MultiCurrency
$multicurrency_total_ht = $tabprice[16];
$multicurrency_total_tva = $tabprice[17];
$multicurrency_total_ttc = $tabprice[18];
$pu_ht_devise = $tabprice[19];
-
+
if (empty($info_bits)) $info_bits=0;
if ($idproduct)
@@ -1545,7 +1545,7 @@ class FactureFournisseur extends CommonInvoice
$line->pu_ttc = $pu_ttc;
$line->qty = $qty;
$line->remise_percent = $remise_percent;
-
+
$line->vat_src_code=$vat_src_code;
$line->tva_tx = $vatrate;
$line->localtax1_tx = $txlocaltax1;
@@ -1871,7 +1871,7 @@ class FactureFournisseur extends CommonInvoice
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"';
}
-
+
$linkstart = '';
$linkend='';
@@ -2179,10 +2179,10 @@ class FactureFournisseur extends CommonInvoice
}
else
{
- $modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation
+ $modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation
}
}
-
+
if (empty($modele))
{
return 0;
@@ -2266,7 +2266,7 @@ class SupplierInvoiceLine extends CommonObjectLine
public $product_ref;
/**
- * Supplier reference of price when we added the line. May have been changed after line was added.
+ * Supplier reference of price when we added the line. May have been changed after line was added.
* TODO Rename field ref to ref_supplier into table llx_facture_fourn_det and llx_commande_fournisseurdet and update fields into updateline
* @var string
*/
@@ -2555,13 +2555,13 @@ class SupplierInvoiceLine extends CommonObjectLine
$sql.= ", product_type = ".$this->product_type;
$sql.= ", info_bits = ".$this->info_bits;
$sql.= ", fk_unit = ".$fk_unit;
-
+
// Multicurrency
$sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice)."";
$sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht)."";
$sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva)."";
$sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc)."";
-
+
$sql.= " WHERE rowid = ".$this->id;
dol_syslog(get_class($this)."::update", LOG_DEBUG);
@@ -2675,7 +2675,7 @@ class SupplierInvoiceLine extends CommonObjectLine
$sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").",";
$sql.= " '".$this->db->escape($this->desc)."',";
$sql.= " ".price2num($this->qty).",";
-
+
$sql.= " ".(empty($this->vat_src_code)?"''":"'".$this->vat_src_code."'").",";
$sql.= " ".price2num($this->tva_tx).",";
$sql.= " ".price2num($this->localtax1_tx).",";
@@ -2745,7 +2745,7 @@ class SupplierInvoiceLine extends CommonObjectLine
$this->db->rollback();
return -2;
}
- }
+ }
/**
* Mise a jour de l'objet ligne de commande en base
*
diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php
index ad05d000f8c..bff5c773cfc 100644
--- a/htdocs/fourn/facture/list.php
+++ b/htdocs/fourn/facture/list.php
@@ -46,6 +46,7 @@ if (!$user->rights->fournisseur->facture->lire) accessforbidden();
$langs->load("bills");
$langs->load("companies");
$langs->load('products');
+$langs->load('projects');
$socid = GETPOST('socid','int');
diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
index 974184b5f58..48569c36fb8 100644
--- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
+++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql
@@ -184,6 +184,7 @@ ALTER TABLE llx_resource_extrafields ADD INDEX idx_resource_extrafields (fk_obje
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_SIZE_SHORTLIST_LIMIT')__,__ENCRYPT('3')__,'chaine','Max length for small lists (tabs)',0);
+INSERT INTO llx_const (name, value, type, note, visible, entity) values (__ENCRYPT('EXPEDITION_ADDON_NUMBER')__, __ENCRYPT('mod_expedition_safor')__, 'chaine','Name for numbering manager for shipments',0,1);
ALTER TABLE llx_bank_account ADD COLUMN note_public text;
ALTER TABLE llx_bank_account ADD COLUMN model_pdf varchar(255);
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index defcafa7b65..951e2b68c05 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -22,7 +22,7 @@ FilesUpdated=Updated Files
FilesModified=Modified Files
FilesAdded=Added Files
FileCheckDolibarr=Check integrity of application files
-AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when application is installed from a certified package
+AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when application is installed from an official package
XmlNotFound=Xml Integrity File of application not found
SessionId=Session ID
SessionSaveHandler=Handler to save sessions
@@ -296,7 +296,7 @@ YouCanSubmitFile=For this step, you can send package using this tool: Select mod
CurrentVersion=Dolibarr current version
CallUpdatePage=Go to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version
-LastActivationDate=Last activation date
+LastActivationDate=Latest activation date
UpdateServerOffline=Update server offline
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:
{000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask.
{000000+000} same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s.
{000000@x} same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required.
{dd} day (01 to 31).
{mm} month (01 to 12).
{yy}, {yyyy} or {y} year over 2, 4 or 1 numbers.
GenericMaskCodes2={cccc} the client code on n characters
{cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.
{tttt} The code of third party type on n characters (see dictionary-thirdparty types).
@@ -1398,7 +1398,7 @@ SendingsSetup=Sending module setup
SendingsReceiptModel=Sending receipt model
SendingsNumberingModules=Sendings numbering modules
SendingsAbility=Support shipping sheets for customer deliveries
-NoNeedForDeliveryReceipts=In most cases, sendings receipts are used both as sheets for customer deliveries (list of products to send) and sheets that is recevied and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated.
+NoNeedForDeliveryReceipts=In most cases, shipping sheets are used both as sheets for customer deliveries (list of products to send) and sheets that is received and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated.
FreeLegalTextOnShippings=Free text on shipments
##### Deliveries #####
DeliveryOrderNumberingModules=Products deliveries receipt numbering module
@@ -1621,7 +1621,7 @@ MailToSendSupplierOrder=To send supplier order
MailToSendSupplierInvoice=To send supplier invoice
MailToThirdparty=To send email from third party page
ByDefaultInList=Show by default on list view
-YouUseLastStableVersion=You use the last stable version
+YouUseLastStableVersion=You use the latest stable version
TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites)
TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites)
ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read ChangeLog for complete list of changes.
diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang
index 07a720e6537..a6071e38fa5 100644
--- a/htdocs/langs/en_US/banks.lang
+++ b/htdocs/langs/en_US/banks.lang
@@ -74,13 +74,13 @@ Conciliate=Reconcile
Conciliation=Reconciliation
ReconciliationLate=Reconciliation late
IncludeClosedAccount=Include closed accounts
-OnlyOpenedAccount=Only open accounts
+OnlyOpenedAccount=Only opened accounts
AccountToCredit=Account to credit
AccountToDebit=Account to debit
DisableConciliation=Disable reconciliation feature for this account
ConciliationDisabled=Reconciliation feature disabled
LinkedToAConciliatedTransaction=Linked to a conciliated entry
-StatusAccountOpened=Open
+StatusAccountOpened=Opened
StatusAccountClosed=Closed
AccountIdShort=Number
LineRecord=Transaction
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index bd1f7bd2fc9..548bc370004 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -1,13 +1,13 @@
# Dolibarr language file - Source file is en_US - bills
Bill=Invoice
Bills=Invoices
-BillsCustomers=Customers invoices
-BillsCustomer=Customers invoice
-BillsSuppliers=Suppliers invoices
-BillsCustomersUnpaid=Unpaid customers invoices
-BillsCustomersUnpaidForCompany=Unpaid customer's invoices for %s
-BillsSuppliersUnpaid=Unpaid supplier's invoices
-BillsSuppliersUnpaidForCompany=Unpaid supplier's invoices for %s
+BillsCustomers=Customer invoices
+BillsCustomer=Customer invoice
+BillsSuppliers=Supplier invoices
+BillsCustomersUnpaid=Unpaid customer invoices
+BillsCustomersUnpaidForCompany=Unpaid customer invoices for %s
+BillsSuppliersUnpaid=Unpaid supplier invoices
+BillsSuppliersUnpaidForCompany=Unpaid supplier invoices for %s
BillsLate=Late payments
BillsStatistics=Customers invoices statistics
BillsStatisticsSuppliers=Suppliers invoices statistics
@@ -151,14 +151,14 @@ NoQualifiedRecurringInvoiceTemplateFound=No recurring template invoice qualified
FoundXQualifiedRecurringInvoiceTemplate=Found %s recurring template invoice(s) qualified for generation.
NotARecurringInvoiceTemplate=Not a recurring template invoice
NewBill=New invoice
-LastBills=Last %s invoices
-LastCustomersBills=Last %s customers invoices
-LastSuppliersBills=Last %s suppliers invoices
+LastBills=Latest %s invoices
+LastCustomersBills=Latest %s customer invoices
+LastSuppliersBills=Latest %s supplier invoices
AllBills=All invoices
OtherBills=Other invoices
DraftBills=Draft invoices
-CustomersDraftInvoices=Customers draft invoices
-SuppliersDraftInvoices=Suppliers draft invoices
+CustomersDraftInvoices=Customer draft invoices
+SuppliersDraftInvoices=Supplier draft invoices
Unpaid=Unpaid
ConfirmDeleteBill=Are you sure you want to delete this invoice?
ConfirmValidateBill=Are you sure you want to validate this invoice with reference %s?
diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang
index 98970318e85..38b03b4268d 100644
--- a/htdocs/langs/en_US/boxes.lang
+++ b/htdocs/langs/en_US/boxes.lang
@@ -25,8 +25,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers
BoxTitleLastModifiedSuppliers=Latest %s modified suppliers
BoxTitleLastModifiedCustomers=Latest %s modified customers
BoxTitleLastCustomersOrProspects=Latest %s customers or prospects
-BoxTitleLastCustomerBills=Latest %s customer's invoices
-BoxTitleLastSupplierBills=Latest %s supplier's invoices
+BoxTitleLastCustomerBills=Latest %s customer invoices
+BoxTitleLastSupplierBills=Latest %s supplier invoices
BoxTitleLastModifiedProspects=Latest %s modified prospects
BoxTitleLastModifiedMembers=Latest %s members
BoxTitleLastFicheInter=Latest %s modified interventions
@@ -51,12 +51,12 @@ ClickToAdd=Click here to add.
NoRecordedCustomers=No recorded customers
NoRecordedContacts=No recorded contacts
NoActionsToDo=No actions to do
-NoRecordedOrders=No recorded customer's orders
+NoRecordedOrders=No recorded customer orders
NoRecordedProposals=No recorded proposals
-NoRecordedInvoices=No recorded customer's invoices
-NoUnpaidCustomerBills=No unpaid customer's invoices
-NoUnpaidSupplierBills=No unpaid supplier's invoices
-NoModifiedSupplierBills=No recorded supplier's invoices
+NoRecordedInvoices=No recorded customer invoices
+NoUnpaidCustomerBills=No unpaid customer invoices
+NoUnpaidSupplierBills=No unpaid supplier invoices
+NoModifiedSupplierBills=No recorded supplier invoices
NoRecordedProducts=No recorded products/services
NoRecordedProspects=No recorded prospects
NoContractedProducts=No products/services contracted
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index bd6846bf694..1b7efa3c14e 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -390,7 +390,7 @@ ListCustomersShort=List of customers
ThirdPartiesArea=Third parties and contact area
LastModifiedThirdParties=Latest %s modified third parties
UniqueThirdParties=Total of unique third parties
-InActivity=Open
+InActivity=Opened
ActivityCeased=Closed
ThirdPartyIsClosed=Third party is closed
ProductsIntoElements=List of products/services into %s
@@ -405,7 +405,7 @@ MergeThirdparties=Merge third parties
ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one.
ThirdpartiesMergeSuccess=Thirdparties have been merged
SaleRepresentativeLogin=Login of sales representative
-SaleRepresentativeFirstname=Firstname of sales representative
-SaleRepresentativeLastname=Lastname of sales representative
+SaleRepresentativeFirstname=First name of sales representative
+SaleRepresentativeLastname=Last name of sales representative
ErrorThirdpartiesMerge=There was an error when deleting the thirdparties. Please check the log. Changes have been reverted.
NewCustomerSupplierCodeProposed=New customer or supplier code suggested on duplicate code
diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang
index 8abfa580740..03b972463c7 100644
--- a/htdocs/langs/en_US/cron.lang
+++ b/htdocs/langs/en_US/cron.lang
@@ -17,8 +17,8 @@ CronMethodDoesNotExists=Class %s does not contains any method %s
# Menu
EnabledAndDisabled=Enabled and disabled
# Page list
-CronLastOutput=Last run output
-CronLastResult=Last result code
+CronLastOutput=Latest run output
+CronLastResult=Latest result code
CronCommand=Command
CronList=Scheduled jobs
CronDelete=Delete scheduled jobs
diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang
index 7933be96aba..441701c098d 100644
--- a/htdocs/langs/en_US/holiday.lang
+++ b/htdocs/langs/en_US/holiday.lang
@@ -76,8 +76,8 @@ BoxTitleLastLeaveRequests=Latest %s modified leave requests
HolidaysMonthlyUpdate=Monthly update
ManualUpdate=Manual update
HolidaysCancelation=Leave request cancelation
-EmployeeLastname=Employee lastname
-EmployeeFirstname=Employee firstname
+EmployeeLastname=Employee last name
+EmployeeFirstname=Employee first name
TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed
## Configuration du Module ##
diff --git a/htdocs/langs/en_US/ldap.lang b/htdocs/langs/en_US/ldap.lang
index a17019d00fb..42e699de311 100644
--- a/htdocs/langs/en_US/ldap.lang
+++ b/htdocs/langs/en_US/ldap.lang
@@ -13,8 +13,8 @@ LDAPUsers=Users in LDAP database
LDAPFieldStatus=Status
LDAPFieldFirstSubscriptionDate=First subscription date
LDAPFieldFirstSubscriptionAmount=First subscription amount
-LDAPFieldLastSubscriptionDate=Last subscription date
-LDAPFieldLastSubscriptionAmount=Last subscription amount
+LDAPFieldLastSubscriptionDate=Latest subscription date
+LDAPFieldLastSubscriptionAmount=Latest subscription amount
LDAPFieldSkype=Skype id
LDAPFieldSkypeExample=Example : skypeName
UserSynchronized=User synchronized
diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang
index c337b6e1119..897085ec423 100644
--- a/htdocs/langs/en_US/mails.lang
+++ b/htdocs/langs/en_US/mails.lang
@@ -85,7 +85,7 @@ LineInFile=Line %s in file
RecipientSelectionModules=Defined requests for recipient's selection
MailSelectedRecipients=Selected recipients
MailingArea=EMailings area
-LastMailings=Last %s emailings
+LastMailings=Latest %s emailings
TargetsStatistics=Targets statistics
NbOfCompaniesContacts=Unique contacts/addresses
MailNoChangePossible=Recipients for validated emailing can't be changed
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 1c9c74471ca..35b70214771 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -87,7 +87,7 @@ Undefined=Undefined
PasswordForgotten=Password forgotten?
SeeAbove=See above
HomeArea=Home area
-LastConnexion=Last connection
+LastConnexion=Latest connection
PreviousConnexion=Previous connection
PreviousValue=Previous value
ConnectedOnMultiCompany=Connected on environment
@@ -237,7 +237,7 @@ DateCreation=Creation date
DateCreationShort=Creat. date
DateModification=Modification date
DateModificationShort=Modif. date
-DateLastModification=Last modification date
+DateLastModification=Latest modification date
DateValidation=Validation date
DateClosing=Closing date
DateDue=Due date
@@ -433,7 +433,7 @@ Reportings=Reporting
Draft=Draft
Drafts=Drafts
Validated=Validated
-Opened=Open
+Opened=Opened
New=New
Discount=Discount
Unknown=Unknown
diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang
index e1c0e859ea6..21feb74c829 100644
--- a/htdocs/langs/en_US/members.lang
+++ b/htdocs/langs/en_US/members.lang
@@ -136,8 +136,8 @@ DocForAllMembersCards=Generate business cards for all members
DocForOneMemberCards=Generate business cards for a particular member
DocForLabels=Generate address sheets
SubscriptionPayment=Subscription payment
-LastSubscriptionDate=Last subscription date
-LastSubscriptionAmount=Last subscription amount
+LastSubscriptionDate=Latest subscription date
+LastSubscriptionAmount=Latest subscription amount
MembersStatisticsByCountries=Members statistics by country
MembersStatisticsByState=Members statistics by state/province
MembersStatisticsByTown=Members statistics by town
@@ -149,7 +149,7 @@ MembersByStateDesc=This screen show you statistics on members by state/provinces
MembersByTownDesc=This screen show you statistics on members by town.
MembersStatisticsDesc=Choose statistics you want to read...
MenuMembersStats=Statistics
-LastMemberDate=Last member date
+LastMemberDate=Latest member date
Nature=Nature
Public=Information are public
NewMemberbyWeb=New member added. Awaiting approval
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 7b4d7ae9e94..a5be88d543a 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -238,7 +238,7 @@ GlobalVariables=Global variables
VariableToUpdate=Variable to update
GlobalVariableUpdaters=Global variable updaters
UpdateInterval=Update interval (minutes)
-LastUpdated=Last updated
+LastUpdated=Latest update
CorrectlyUpdated=Correctly updated
PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is
PropalMergePdfProductChooseFile=Select PDF files
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 8e40307cac6..f9c603ce113 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -29,9 +29,9 @@ DeleteAProject=Delete a project
DeleteATask=Delete a task
ConfirmDeleteAProject=Are you sure you want to delete this project?
ConfirmDeleteATask=Are you sure you want to delete this task?
-OpenedProjects=Open projects
-OpenedTasks=Open tasks
-OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status
+OpenedProjects=Opened projects
+OpenedTasks=Opened tasks
+OpportunitiesStatusForOpenedProjects=Opportunities amount of opened projects by status
OpportunitiesStatusForProjects=Opportunities amount of projects by status
ShowProject=Show project
SetProject=Set project
@@ -47,7 +47,7 @@ TaskTimeSpent=Time spent on tasks
TaskTimeUser=User
TaskTimeNote=Note
TaskTimeDate=Date
-TasksOnOpenedProject=Tasks on open projects
+TasksOnOpenedProject=Tasks on opened projects
WorkloadNotDefined=Workload not defined
NewTimeSpent=New time spent
MyTimeSpent=My time spent
@@ -179,9 +179,9 @@ ProjectsStatistics=Statistics on projects/leads
TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible.
IdTaskTime=Id task time
YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes.
-OpenedProjectsByThirdparties=Open projects by thirdparties
+OpenedProjectsByThirdparties=Opened projects by thirdparties
OnlyOpportunitiesShort=Only opportunities
-OpenedOpportunitiesShort=Open opportunities
+OpenedOpportunitiesShort=Opened opportunities
NotAnOpportunityShort=Not an opportunity
OpportunityTotalAmount=Opportunities total amount
OpportunityPonderatedAmount=Opportunities weighted amount
diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang
index f383af9f1af..cd76dd46f43 100644
--- a/htdocs/langs/en_US/propal.lang
+++ b/htdocs/langs/en_US/propal.lang
@@ -3,7 +3,7 @@ Proposals=Commercial proposals
Proposal=Commercial proposal
ProposalShort=Proposal
ProposalsDraft=Draft commercial proposals
-ProposalsOpened=Open commercial proposals
+ProposalsOpened=Opened commercial proposals
Prop=Commercial proposals
CommercialProposal=Commercial proposal
ProposalCard=Proposal card
@@ -26,9 +26,9 @@ AmountOfProposalsByMonthHT=Amount by month (net of tax)
NbOfProposals=Number of commercial proposals
ShowPropal=Show proposal
PropalsDraft=Drafts
-PropalsOpened=Open
+PropalsOpened=Opened
PropalStatusDraft=Draft (needs to be validated)
-PropalStatusValidated=Validated (proposal is open)
+PropalStatusValidated=Validated (proposal is opened)
PropalStatusSigned=Signed (needs billing)
PropalStatusNotSigned=Not signed (closed)
PropalStatusBilled=Billed
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index cfced089c3a..88bc6d834aa 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -29,8 +29,8 @@ Location=Location
LocationSummary=Short name location
NumberOfDifferentProducts=Number of different products
NumberOfProducts=Total number of products
-LastMovement=Last movement
-LastMovements=Last movements
+LastMovement=Latest movement
+LastMovements=Latest movements
Units=Units
Unit=Unit
StockCorrection=Correct stock
diff --git a/htdocs/langs/en_US/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang
index 621d7784e35..61b031459b0 100644
--- a/htdocs/langs/en_US/supplier_proposal.lang
+++ b/htdocs/langs/en_US/supplier_proposal.lang
@@ -8,7 +8,7 @@ SearchRequest=Find a request
DraftRequests=Draft requests
SupplierProposalsDraft=Draft supplier proposals
LastModifiedRequests=Latest %s modified price requests
-RequestsOpened=Open price requests
+RequestsOpened=Opened price requests
SupplierProposalArea=Supplier proposals area
SupplierProposalShort=Supplier proposal
SupplierProposals=Supplier proposals
@@ -23,7 +23,7 @@ ConfirmValidateAsk=Are you sure you want to validate this price request under na
DeleteAsk=Delete request
ValidateAsk=Validate request
SupplierProposalStatusDraft=Draft (needs to be validated)
-SupplierProposalStatusValidated=Validated (request is open)
+SupplierProposalStatusValidated=Validated (request is opened)
SupplierProposalStatusClosed=Closed
SupplierProposalStatusSigned=Accepted
SupplierProposalStatusNotSigned=Refused
diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang
index 4a002fab02c..446eb242d92 100644
--- a/htdocs/langs/en_US/users.lang
+++ b/htdocs/langs/en_US/users.lang
@@ -36,7 +36,7 @@ AdministratorDesc=Administrator
DefaultRights=Default permissions
DefaultRightsDesc=Define here default permissions that are automatically granted to a new created user (Go on user card to change permission of an existing user).
DolibarrUsers=Dolibarr users
-LastName=Last Name
+LastName=Last name
FirstName=First name
ListOfGroups=List of groups
NewGroup=New group
diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php
index c050acc7663..437361b5cf5 100644
--- a/htdocs/product/stock/replenish.php
+++ b/htdocs/product/stock/replenish.php
@@ -289,12 +289,7 @@ if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrep
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')';
}
$sql.= ' WHERE p.entity IN (' . getEntity("product", 1) . ')';
-if ($sall) {
- $sql .= ' AND (p.ref LIKE "%'.$db->escape($sall).'%" ';
- $sql .= 'OR p.label LIKE "%'.$db->escape($sall).'%" ';
- $sql .= 'OR p.description LIKE "%'.$db->escape($sall).'%" ';
- $sql .= 'OR p.note LIKE "%'.$db->escape($sall).'%")';
-}
+if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
// if the type is not 1, we show all products (type = 0,2,3)
if (dol_strlen($type)) {
if ($type == 1) {
@@ -303,20 +298,8 @@ if (dol_strlen($type)) {
$sql .= ' AND p.fk_product_type <> 1';
}
}
-if ($sref) {
- //natural search
- $scrit = explode(' ', $sref);
- foreach ($scrit as $crit) {
- $sql .= ' AND p.ref LIKE "%' . $crit . '%"';
- }
-}
-if ($snom) {
- //natural search
- $scrit = explode(' ', $snom);
- foreach ($scrit as $crit) {
- $sql .= ' AND p.label LIKE "%' . $db->escape($crit) . '%"';
- }
-}
+if ($sref) $sql.=natural_search('p.ref', $sref);
+if ($snom) $sql.=natural_search('p.label', $snom);
$sql.= ' AND p.tobuy = 1';
if (!empty($canvas)) $sql .= ' AND p.canvas = "' . $db->escape($canvas) . '"';
$sql.= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price';
@@ -522,7 +505,7 @@ print_liste_field_titre($langs->trans('StockLimitShort'), $_SERVER["PHP_SELF"],
print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('Ordered'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('StockToBuy'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
-print_liste_field_titre($langs->trans('Supplier'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
+print_liste_field_titre($langs->trans('SupplierRef'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
print "\n";
// Lignes des champs de filtre
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 76ea99b8720..86fb2d88a1e 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -3609,7 +3609,9 @@ class Societe extends CommonObject
*/
public function setCategories($categories, $type)
{
- // Decode type
+ require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
+
+ // Decode type
if ($type == 'customer') {
$type_id = Categorie::TYPE_CUSTOMER;
$type_text = 'customer';
@@ -3627,7 +3629,6 @@ class Societe extends CommonObject
}
// Get current categories
- require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$c = new Categorie($this->db);
$existing = $c->containing($this->id, $type_id, 'id');