aa
This commit is contained in:
@@ -12,7 +12,8 @@
|
|||||||
<input type="text" id="article_id" name="id" />
|
<input type="text" id="article_id" name="id" />
|
||||||
<br>
|
<br>
|
||||||
<button type="button" data-action="search">Cerca Articolo</button>
|
<button type="button" data-action="search">Cerca Articolo</button>
|
||||||
<button type="button" data-action="checkPrevendita">E' in PreVendita?</button>
|
<button type="button" data-action="checkPrevendita">E' in PreVendita?</button><br>
|
||||||
|
<button type="button" data-action="inprevendita">Libri in Prevendita</button>
|
||||||
</form>
|
</form>
|
||||||
<div id="result"></div>
|
<div id="result"></div>
|
||||||
|
|
||||||
|
|||||||
@@ -6120,12 +6120,8 @@ Route::get('/paolibri', function () {
|
|||||||
//->where(function($query){
|
//->where(function($query){
|
||||||
//->where('DescrizioneStatoProdotto','Usato')
|
//->where('DescrizioneStatoProdotto','Usato')
|
||||||
->where(function ($query) {
|
->where(function ($query) {
|
||||||
$query->where('DescrizioneStatoProdotto', 'In commercio')
|
$query->where('DescrizioneStatoProdotto', 'In prevendita');
|
||||||
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
|
|
||||||
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
|
|
||||||
})
|
})
|
||||||
//->orWhere('DescrizioneStatoProdotto','Remainder');
|
|
||||||
//})
|
|
||||||
->where(DB::raw('CONVERT(INT, QtaDisponibile)'), '>', 0)
|
->where(DB::raw('CONVERT(INT, QtaDisponibile)'), '>', 0)
|
||||||
->where('DescrizioneFormato', 'brossura')
|
->where('DescrizioneFormato', 'brossura')
|
||||||
->where('DescrizioneTipologia', 'Libri')
|
->where('DescrizioneTipologia', 'Libri')
|
||||||
@@ -6146,7 +6142,7 @@ Route::get('/paolibri', function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/qtanegativa', function () {
|
Route::get('/inprevendita', function () {
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
$articles = Article::join(DB::raw('(SELECT IdArticolo, MAX(DataOra) AS data FROM T_WEB_Articoli GROUP BY IdArticolo) b'), function ($join) {
|
||||||
@@ -6167,21 +6163,11 @@ Route::get('/qtanegativa', function () {
|
|||||||
$join->on('T_WEB_Articoli.IdArticolo', '=', 'q.Codice');
|
$join->on('T_WEB_Articoli.IdArticolo', '=', 'q.Codice');
|
||||||
})
|
})
|
||||||
|
|
||||||
// ->where('DescrizioneStatoProdotto', 'usato')
|
->where('DescrizioneStatoProdotto', 'In prevendita')
|
||||||
//->where(function($query){
|
|
||||||
//->where('DescrizioneStatoProdotto','Usato')
|
|
||||||
->where(function ($query) {
|
|
||||||
$query->where('DescrizioneStatoProdotto', 'In commercio')
|
|
||||||
->orWhere('DescrizioneStatoProdotto', 'In prevendita')
|
|
||||||
->orWhere('DescrizioneStatoProdotto', 'Prossima uscita');
|
|
||||||
})
|
|
||||||
//->orWhere('DescrizioneStatoProdotto','Remainder');
|
|
||||||
//})
|
|
||||||
->where(DB::raw('CONVERT(INT, QtaDisponibile)'), '<', 0)
|
->where(DB::raw('CONVERT(INT, QtaDisponibile)'), '<', 0)
|
||||||
->where('DescrizioneFormato', 'brossura')
|
->where('DescrizioneFormato', 'brossura')
|
||||||
->where('DescrizioneTipologia', 'Libri')
|
->where('DescrizioneTipologia', 'Libri')
|
||||||
->orderBy('DataPubblicazione', 'desc')
|
->orderBy('DataPubblicazione', 'desc')
|
||||||
->limit(20)
|
|
||||||
->get();
|
->get();
|
||||||
$sep = ' | ';
|
$sep = ' | ';
|
||||||
|
|
||||||
@@ -6211,7 +6197,7 @@ Route::get('/qtanegativa', function () {
|
|||||||
|
|
||||||
$ind++;
|
$ind++;
|
||||||
}
|
}
|
||||||
})->name('qtanegativa');
|
})->name('inprevendita');
|
||||||
|
|
||||||
Route::get('/mylinkspao', function () {
|
Route::get('/mylinkspao', function () {
|
||||||
return view('mylinkspao');
|
return view('mylinkspao');
|
||||||
@@ -6222,6 +6208,8 @@ Route::get('/handle-article-action-pao/{id}/{action}', function ($id, $action) {
|
|||||||
if ($action == 'search') {
|
if ($action == 'search') {
|
||||||
// Logica di ricerca dell'articolo
|
// Logica di ricerca dell'articolo
|
||||||
return loadArticleByIdArticle($id);
|
return loadArticleByIdArticle($id);
|
||||||
|
} elseif ($action == 'inprevendita') {
|
||||||
|
return route('inprevendita');
|
||||||
} elseif ($action == 'checkPrevendita') {
|
} elseif ($action == 'checkPrevendita') {
|
||||||
// Logica per verificare se l'articolo è in preordine
|
// Logica per verificare se l'articolo è in preordine
|
||||||
$inprevendita = isArticleInPrevendita($id);
|
$inprevendita = isArticleInPrevendita($id);
|
||||||
|
|||||||
Reference in New Issue
Block a user