SHARE
TWEET

Untitled

a guest Jun 24th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function cuentaCorriente()
  2.  {
  3.     return $this->hasOne('SisInventarioCuentaCorriente', 'idpersona', 'idpersona');
  4.  }
  5.      
  6. public function pagoCorriente()
  7. {
  8.     return $this->hasMany('SisInventarioPagoCorriente', 'idcuenta_corriente', 'idcuenta_corriente');
  9. }
  10.      
  11. $cuentaProveedor = Persona::with('cuentaCorriente.pagoCorriente')->where('cliente_proveedor','proveedor')->get();
  12.      
  13. {{$cuentaProveedor->cuentaCorriente->pagoCorriente->sum('monto')}}}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top