Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. $this->data['produtos'] = $this->eventos_model->getProdutos($this->uri->segment(3));
  2. $this->data['servicos'] = $this->eventos_model->getServicos($this->uri->segment(3));
  3.  
  4. $totalProduto = 0;
  5. $totalServico = 0;
  6.  
  7. foreach ($this->data['produtos'] as $key => $value) {
  8. $totalProduto += $value->valorLiquido;
  9. }
  10. foreach ($this->data['servicos'] as $key => $value) {
  11. $totalServico += $value->valorLiquido;
  12. }
  13. $total = $totalProduto + $totalServico;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement