mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en pagos (datepicker)
This commit is contained in:
@ -14,7 +14,7 @@ class FacturaPagoModel extends \App\Models\BaseModel {
|
||||
'forma_pago_id',
|
||||
'total',
|
||||
'deleted_at',
|
||||
'user_update_id'
|
||||
'user_updated_id'
|
||||
];
|
||||
|
||||
protected $returnType = "App\Entities\Facturas\FacturaPagoEntity";
|
||||
@ -23,4 +23,20 @@ class FacturaPagoModel extends \App\Models\BaseModel {
|
||||
protected $useSoftDeletes = true;
|
||||
|
||||
public static $labelField = "id";
|
||||
|
||||
public function getResource($factura_id)
|
||||
{
|
||||
$builder = $this->db
|
||||
->table($this->table . " t1")
|
||||
->select(
|
||||
"t1.id AS id, t1.factura_id AS factura_id,
|
||||
t1.notes AS notes, t1.fecha_pago_at AS fecha_pago_at, t1.fecha_vencimiento_at AS fecha_vencimiento_at,
|
||||
t1.forma_pago_id AS forma_pago_id, t2.nombre as forma_pago, t1.total AS total"
|
||||
)
|
||||
->join("formas_pago t2", "t2.id = t1.forma_pago_id", "left")
|
||||
->where("t1.factura_id", $factura_id)
|
||||
->where("t1.deleted_at", null);
|
||||
|
||||
return $builder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user