';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index eb63f76319f..34e86acee60 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -395,12 +395,12 @@ class Form
$htmltext=str_replace("\n","",$htmltext);
$htmltext=str_replace('"',""",$htmltext);
- if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td img tag to store tooltip
+ if ($tooltipon == 2 || $tooltipon == 3) $paramfortooltipimg=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td img tag to store tooltip
else $paramfortooltipimg =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
- if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
+ if ($tooltipon == 1 || $tooltipon == 3) $paramfortooltiptd=' class="classfortooltip inline-block'.($extracss?' '.$extracss:'').'" style="padding: 0px;" title="'.($noencodehtmltext?$htmltext:dol_escape_htmltag($htmltext,1)).'"'; // Attribut to put on td tag to store tooltip
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
$s="";
- if (empty($notabs)) $s.='
';
+ if (empty($notabs)) $s.='
';
elseif ($notabs == 2) $s.='
';
if ($direction < 0) {
$s.='<'.$tag.$paramfortooltipimg;
@@ -412,8 +412,8 @@ class Form
// Use another method to help avoid having a space in value in order to use this value with jquery
// TODO add this in css
//if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').''.$tag.'>';
- $paramfortooltiptd.= (($direction < 0)?' class="inline-block" style="padding-left: 3px !important;"':'');
- $paramfortooltiptd.= (($direction > 0)?' class="inline-block" style="padding-right: 3px !important;"':'');
+ $paramfortooltiptd.= (($direction < 0)?' class="inline-block" style="padding: 0px; padding-left: 3px !important;"':'');
+ $paramfortooltiptd.= (($direction > 0)?' class="inline-block" style="padding: 0px; padding-right: 3px !important;"':'');
if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''.$tag.'>';
if ($direction > 0) {
$s.='<'.$tag.$paramfortooltipimg;
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index d2014837373..bc63d9c51ac 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -455,7 +455,7 @@ class FormCompany
{
$out.= '
';
$out.= '
';
- // List of actions on element
- include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
- $formactions=new FormActions($db);
- $somethingshown=$formactions->showactions($object,'order_supplier',$socid);
-
-
if ($user->rights->fournisseur->commande->commander && $object->statut == 2)
{
/*
* Commander (action=commande)
*/
- print ' ';
print '';
+ print " ";
}
if ($user->rights->fournisseur->commande->receptionner && ($object->statut == 3 || $object->statut == 4))
@@ -2733,12 +2782,12 @@ elseif (! empty($object->id))
/*
* Receptionner (action=livraison)
*/
- print ' ';
print '\n";
+ print " ";
}
+ // List of actions on element
+ include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
+ $formactions=new FormActions($db);
+ $somethingshown=$formactions->showactions($object,'order_supplier',$socid);
+
+
// List of actions on element
/* Hidden because" available into "Log" tab
print ' ';
diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
index 9475719732d..b1b4eccbf56 100644
--- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
@@ -385,6 +385,8 @@ ALTER TABLE llx_commande ADD COLUMN fk_incoterms integer;
ALTER TABLE llx_commande ADD COLUMN location_incoterms varchar(255);
ALTER TABLE llx_commande_fournisseur ADD COLUMN fk_incoterms integer;
ALTER TABLE llx_commande_fournisseur ADD COLUMN location_incoterms varchar(255);
+ALTER TABLE llx_commande_fournisseur ADD COLUMN date_approve2 datetime after date_approve;
+ALTER TABLE llx_commande_fournisseur ADD COLUMN fk_user_approve2 integer after fk_user_approve;
ALTER TABLE llx_facture ADD COLUMN fk_incoterms integer;
ALTER TABLE llx_facture ADD COLUMN location_incoterms varchar(255);
ALTER TABLE llx_facture_fourn ADD COLUMN fk_incoterms integer;
diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql
index 17027e16960..247c8e8d6af 100644
--- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql
+++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql
@@ -36,11 +36,13 @@ create table llx_commande_fournisseur
date_creation datetime, -- date de creation
date_valid datetime, -- date de validation
date_approve datetime, -- date de approve
+ date_approve2 datetime, -- date de approve 2 (when double approving is accivated)
date_commande date, -- date de la commande
fk_user_author integer, -- user making creation
fk_user_modif integer, -- user making last change
fk_user_valid integer, -- user validating
fk_user_approve integer, -- user approving
+ fk_user_approve2 integer, -- user approving 2 (when double approving is accivated)
source smallint NOT NULL, -- not used, except by setting this to 42 for orders coming for replenishment and 0 in other case ?
fk_statut smallint default 0,
amount_ht real default 0,
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 2edde818919..d204ca67dbb 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1565,6 +1565,7 @@ SuppliersSetup=Supplier module setup
SuppliersCommandModel=Complete template of supplier order (logo...)
SuppliersInvoiceModel=Complete template of supplier invoice (logo...)
SuppliersInvoiceNumberingModel=Supplier invoices numbering models
+IfSetToYesDontForgetPermission=If set to yes, don't forget to provide permissions to groups or users allowed for the second approval
##### GeoIPMaxmind #####
GeoIPMaxmindSetup=GeoIP Maxmind module setup
PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation. Examples: /usr/local/share/GeoIP/GeoIP.dat /usr/share/GeoIP/GeoIP.dat
diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang
index 71e26bc21a4..278fb39f0ee 100644
--- a/htdocs/langs/en_US/orders.lang
+++ b/htdocs/langs/en_US/orders.lang
@@ -64,7 +64,8 @@ ShipProduct=Ship product
Discount=Discount
CreateOrder=Create Order
RefuseOrder=Refuse order
-ApproveOrder=Accept order
+ApproveOrder=Approve order
+Approve2Order=Approve order (second level)
ValidateOrder=Validate order
UnvalidateOrder=Unvalidate order
DeleteOrder=Delete order
@@ -120,6 +121,7 @@ PaymentOrderRef=Payment of order %s
CloneOrder=Clone order
ConfirmCloneOrder=Are you sure you want to clone this order %s ?
DispatchSupplierOrder=Receiving supplier order %s
+FirstApprovalAlreadyDone=First approval already done
##### Types de contacts #####
TypeContact_commande_internal_SALESREPFOLL=Representative following-up customer order
TypeContact_commande_internal_SHIPPING=Representative following-up shipping
diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php
index 84b47983d5c..c59894fd3dc 100644
--- a/htdocs/societe/soc.php
+++ b/htdocs/societe/soc.php
@@ -1587,8 +1587,9 @@ else
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
print '