aa
This commit is contained in:
@@ -429,12 +429,12 @@ function isArticleInPrevendita($id, $checkqtanegativa)
|
||||
|
||||
|
||||
function loadArticleByIdArticle($id, $checkprevendita = false, $checkqtanegativa = false)
|
||||
{
|
||||
{
|
||||
|
||||
try {
|
||||
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'b.IdArticolo')
|
||||
->on('T_WEB_Articoli.DataOra', '=', 'b.data');
|
||||
->on('T_WEB_Articoli.Ora', '=', 'b.data');
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT e.IdStatoProdotto, e.Descrizione as DescrizioneStatoProdotto FROM T_WEB_StatiProdotto e
|
||||
JOIN (SELECT IdStatoProdotto, MAX(DataOra) as data1
|
||||
@@ -1270,7 +1270,7 @@ function libriInPrevendita()
|
||||
})
|
||||
->leftJoin(DB::raw('(SELECT g2.IdArgomento, g2.Descrizione as DescrArgomento FROM T_WEB_Argomenti
|
||||
g2 JOIN (SELECT IdArgomento, MAX(DataOra) as data12 from T_WEB_Argomenti
|
||||
GROUP BY IdArgomento) h ON g2.IdArgomento = h.IdArgomento AND g2.DataOra = h.data1 ) i2'), function ($join) {
|
||||
GROUP BY IdArgomento) h ON g2.IdArgomento = h.IdArgomento AND g2.DataOra = h.data12 ) i2'), function ($join) {
|
||||
$join->on('T_WEB_Articoli.ListaArgomenti', '=', 'i2.IdArgomento');
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user