Aggiunto la possibilità nelle regole di importazione di poter aggiungere una nuova categoria
This commit is contained in:
@@ -95,6 +95,9 @@ public function ContoA()
|
||||
'mov_fk_tags'=>$request->mov_fk_tags,
|
||||
'mov_inserito_da'=>$request->userid,
|
||||
'conto_id'=>$request->conto_id,
|
||||
|
||||
// 'conto_id_da'=>$request->conto_id_da,
|
||||
// 'conto_id_a'=>$request->conto_id_a,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -217,21 +220,24 @@ public function ContoA()
|
||||
|
||||
public static function listByCategory($cat) {
|
||||
|
||||
$expression=DB::raw(' SELECT a.id,
|
||||
a.mov_data,
|
||||
a.mov_importo_dare,
|
||||
a.mov_importo_avere,
|
||||
a.mov_descrizione,
|
||||
c.cat_name,
|
||||
t.tag_name,
|
||||
(SELECT Count(entity_id) as quanti FROM gen_docs WHERE entity=0 AND entity_id = a.id) as quanti
|
||||
FROM movimentis as a
|
||||
JOIN tags as t ON a.mov_fk_tags=t.id
|
||||
JOIN categories as c ON a.mov_fk_categoria=c.id
|
||||
WHERE a.mov_fk_categoria = '.$cat );
|
||||
// $expression=DB::raw(' SELECT a.id,
|
||||
// a.mov_data,
|
||||
// a.mov_importo_dare,
|
||||
// a.mov_importo_avere,
|
||||
// a.mov_descrizione,
|
||||
// c.cat_name,
|
||||
// t.tag_name,
|
||||
// (SELECT Count(entity_id) as quanti FROM gen_docs WHERE entity=0 AND entity_id = a.id) as quanti
|
||||
// FROM movimentis as a
|
||||
// JOIN tags as t ON a.mov_fk_tags=t.id
|
||||
// JOIN categories as c ON a.mov_fk_categoria=c.id
|
||||
// WHERE a.mov_fk_categoria = '.$cat );
|
||||
|
||||
$query = $expression->getValue(DB::connection()->getQueryGrammar());
|
||||
return DB::select($query);
|
||||
// $query = $expression->getValue(DB::connection()->getQueryGrammar());
|
||||
// return DB::select($query);
|
||||
return self::with(['Tags', 'Categorie'])
|
||||
->where('mov_fk_categoria', $cat)
|
||||
->get();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user