Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function cuentaCorriente()
- {
- return $this->hasOne('SisInventarioCuentaCorriente', 'idpersona', 'idpersona');
- }
- public function pagoCorriente()
- {
- return $this->hasMany('SisInventarioPagoCorriente', 'idcuenta_corriente', 'idcuenta_corriente');
- }
- $cuentaProveedor = Persona::with('cuentaCorriente.pagoCorriente')->where('cliente_proveedor','proveedor')->get();
- {{$cuentaProveedor->cuentaCorriente->pagoCorriente->sum('monto')}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement