Merge remote-tracking branch 'origin/3.6' into develop
Conflicts: htdocs/comm/action/listactions.php htdocs/compta/prelevement/class/bonprelevement.class.php htdocs/core/lib/date.lib.php htdocs/fourn/facture/fiche.php htdocs/includes/tcpdf/include/tcpdf_static.php htdocs/product/price.php
This commit is contained in:
commit
0cefe5af43
@ -203,6 +203,7 @@ if ($resql)
|
|||||||
|
|
||||||
dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action');
|
dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action');
|
||||||
print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,$action,-1,$actioncode,$usergroup);
|
print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,$action,-1,$actioncode,$usergroup);
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
// Add link to show birthdays
|
// Add link to show birthdays
|
||||||
|
|||||||
@ -1216,18 +1216,11 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
<<<<<<< HEAD
|
|
||||||
* Generate a withdrawal file. Generation Formats:
|
|
||||||
* European countries: SEPA
|
|
||||||
* Others: Warning message
|
|
||||||
* File is generated with name this->filename
|
|
||||||
=======
|
|
||||||
* Generate a withdrawal file.
|
* Generate a withdrawal file.
|
||||||
* Generation Formats:
|
* Generation Formats:
|
||||||
* - Europe: SEPA (France: CFONB no more supported, Spain: AEB19 if external module EsAEB is enabled)
|
* - Europe: SEPA (France: CFONB no more supported, Spain: AEB19 if external module EsAEB is enabled)
|
||||||
* - Others countries: Warning message
|
* - Others countries: Warning message
|
||||||
* File is generated with name this->filename
|
* File is generated with name this->filename
|
||||||
>>>>>>> refs/remotes/origin/3.6
|
|
||||||
*
|
*
|
||||||
* @return int 0 if OK, <0 if KO
|
* @return int 0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -3516,33 +3516,36 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return minimum product recommended price
|
* Return minimum product recommended price
|
||||||
*
|
*
|
||||||
* @return void
|
* @return int Minimum recommanded price that is higher price among all suppliers * PRODUCT_MINIMUM_RECOMMENDED_PRICE
|
||||||
*/
|
*/
|
||||||
function min_recommended_price()
|
function min_recommended_price()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
if ( !empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE))
|
|
||||||
|
$maxpricesupplier=0;
|
||||||
|
|
||||||
|
if (! empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
||||||
$product_fourn = new ProductFournisseur($this->db);
|
$product_fourn = new ProductFournisseur($this->db);
|
||||||
$product_fourn_list = $product_fourn->list_product_fournisseur_price($this->id, '', '');
|
$product_fourn_list = $product_fourn->list_product_fournisseur_price($this->id, '', '');
|
||||||
$maxpricesupplier=0;
|
|
||||||
|
|
||||||
if (is_array($product_fourn_list) && count($product_fourn_list)>0)
|
if (is_array($product_fourn_list) && count($product_fourn_list)>0)
|
||||||
{
|
{
|
||||||
foreach($product_fourn_list as $productfourn)
|
foreach($product_fourn_list as $productfourn)
|
||||||
{
|
{
|
||||||
if ($productfourn->fourn_unitprice>$maxpricesupplier)
|
if ($productfourn->fourn_unitprice > $maxpricesupplier)
|
||||||
{
|
{
|
||||||
$maxpricesupplier = $productfourn->fourn_unitprice;
|
$maxpricesupplier = $productfourn->fourn_unitprice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$maxpricesupplier*=$conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE;
|
$maxpricesupplier *= $conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE;
|
||||||
}
|
}
|
||||||
return $maxpricesupplier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $maxpricesupplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,7 +99,7 @@ if ($action == 'update_price' && ! $_POST ["cancel"] && ($user->rights->produit-
|
|||||||
$newpsq = empty($newpsq) ? 0 : $newpsq;
|
$newpsq = empty($newpsq) ? 0 : $newpsq;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($newprice_min<$maxpricesupplier && !empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE))
|
if (! empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE) && $newprice_min < $maxpricesupplier)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("MinimumPriceLimit",price($maxpricesupplier,0,'',1,-1,-1,'auto')),'errors');
|
setEventMessage($langs->trans("MinimumPriceLimit",price($maxpricesupplier,0,'',1,-1,-1,'auto')),'errors');
|
||||||
$error++;
|
$error++;
|
||||||
@ -227,7 +227,7 @@ if ($action == 'add_customer_price_confirm' && ! $_POST ["cancel"] && ($user->ri
|
|||||||
$prodcustprice->tva_tx = str_replace('*', '', GETPOST("tva_tx"));
|
$prodcustprice->tva_tx = str_replace('*', '', GETPOST("tva_tx"));
|
||||||
$prodcustprice->recuperableonly = (preg_match('/\*/', GETPOST("tva_tx")) ? 1 : 0);
|
$prodcustprice->recuperableonly = (preg_match('/\*/', GETPOST("tva_tx")) ? 1 : 0);
|
||||||
|
|
||||||
if ($prodcustprice->price_min<$maxpricesupplier && !empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE))
|
if (! empty($conf->global->PRODUCT_MINIMUM_RECOMMENDED_PRICE) && $prodcustprice->price_min<$maxpricesupplier)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("MinimumPriceLimit",price($maxpricesupplier,0,'',1,-1,-1,'auto')),'errors');
|
setEventMessage($langs->trans("MinimumPriceLimit",price($maxpricesupplier,0,'',1,-1,-1,'auto')),'errors');
|
||||||
$error++;
|
$error++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user