mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
COrregidos cambios JM
This commit is contained in:
@ -132,7 +132,16 @@ class ImportadorModel extends \App\Models\BaseModel
|
||||
$db = \Config\Database::connect($this->DBGroup);
|
||||
|
||||
$builder = $db->table('pedido_libro t1')
|
||||
->select('t1.id, t1.created_at, t1.titulo, t1.paginas, t1.tirada, t1.total, t1.estado');
|
||||
->select(
|
||||
't1.id,
|
||||
t1.created_at,
|
||||
t1.tirada,
|
||||
(CASE
|
||||
WHEN t1.tirada > 0 THEN t1.total / t1.tirada
|
||||
ELSE 0
|
||||
END) AS precio_ud,
|
||||
t1.total,
|
||||
t1.estado');
|
||||
|
||||
if ($catalogoId !== null) {
|
||||
$builder->where('t1.catalogo_id', $catalogoId);
|
||||
|
||||
Reference in New Issue
Block a user