Fix warning
This commit is contained in:
parent
2e0e42e918
commit
5c15162c40
@ -343,7 +343,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -381,7 +381,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -346,7 +346,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -318,7 +318,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -319,7 +319,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -338,7 +338,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -420,7 +420,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if ($conf->incoterm->enabled)
|
||||
if (! empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -422,7 +422,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -396,7 +396,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -384,7 +384,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -254,7 +254,7 @@ class pdf_squille extends ModelePdfReception
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -336,7 +336,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -342,7 +342,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -370,7 +370,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if ($conf->incoterm->enabled)
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
$desc_incoterms = $object->getIncotermsForPDF();
|
||||
if ($desc_incoterms)
|
||||
|
||||
@ -437,7 +437,7 @@ if ($usevirtualstock)
|
||||
$sql .= ' HAVING (';
|
||||
$sql .= ' ('.$sqldesiredtock.' >= 0 AND ('.$sqldesiredtock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
|
||||
$sql .= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.') + ('.$sqlProductionToProduce.' - '.$sqlProductionToConsume.')))';
|
||||
$sql .= ' OR ';
|
||||
$sql .= ' OR';
|
||||
if ($includeproductswithoutdesiredqty == 'on') {
|
||||
$sql .= ' (('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
|
||||
} else {
|
||||
@ -448,9 +448,9 @@ if ($usevirtualstock)
|
||||
|
||||
if ($salert == 'on') // Option to see when stock is lower than alert
|
||||
{
|
||||
$sql .= ' AND ((';
|
||||
$sql .= ' AND (';
|
||||
if ($includeproductswithoutdesiredqty == 'on') {
|
||||
$sql .= $sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
|
||||
$sql .= '('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
|
||||
} else {
|
||||
$sql .= $sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')';
|
||||
}
|
||||
@ -459,20 +459,25 @@ if ($usevirtualstock)
|
||||
$alertchecked = 'checked';
|
||||
}
|
||||
} else {
|
||||
$sql .= ' HAVING (('.$sqldesiredtock.' >= 0 AND ('.$sqldesiredtock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))';
|
||||
$sql .= ' HAVING (';
|
||||
$sql .= '('.$sqldesiredtock.' >= 0 AND ('.$sqldesiredtock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))';
|
||||
$sql .= ' OR';
|
||||
if ($includeproductswithoutdesiredqty == 'on') {
|
||||
$sql .= ' OR (('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))';
|
||||
$sql .= ' (('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))';
|
||||
} else {
|
||||
$sql .= ' OR ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))';
|
||||
$sql .= ' ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))';
|
||||
}
|
||||
$sql .= ')';
|
||||
|
||||
if ($salert == 'on') // Option to see when stock is lower than alert
|
||||
{
|
||||
$sql .= ' AND (';
|
||||
if ($includeproductswithoutdesiredqty == 'on') {
|
||||
$sql .= ' AND (('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))';
|
||||
$sql .= ' ('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))';
|
||||
} else {
|
||||
$sql .= ' AND ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))';
|
||||
$sql .= ' '.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))';
|
||||
}
|
||||
$sql .= ')';
|
||||
$alertchecked = 'checked';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user