<?php
	class ItemStockController extends ItemStockModel {
		
		private $idDocumento;
		private $idArtigo;
		private $descricao;
		private $qtdDisponivel;
		private $qtd;
		private $preco;

		public function __construct($idDocumento, $idArtigo, $descricao, $qtdDisponivel, $qtd, $preco){
			$this->idDocumento = $idDocumento;
			$this->idArtigo = $idArtigo;
			$this->descricao = $descricao;
			$this->qtdDisponivel = $qtdDisponivel;
			$this->qtd = $qtd;
			$this->preco = $preco;
		}

		public function createItemStock(){
			$result = $this->insertItemStock($this->idDocumento, $this->idArtigo, $this->descricao, $this->qtdDisponivel, $this->qtd, $this->preco);
			return $result;
		}

		public function updateItemStock($idItemStock){
			$result = $this->editItemStock($idItemStock, $this->idDocumento, $this->idArtigo, $this->descricao, $this->qtdDisponivel, $this->qtd, $this->preco);
			return $result;
		}

		public function createItemStockSaida(){
			$result = $this->insertItemStockSaida($this->idDocumento, $this->idArtigo, $this->descricao, $this->qtdDisponivel, $this->qtd, $this->preco);
			return $result;
		}

		public function createItemStockInventario(){
			$result = $this->insertItemStockInventario($this->idDocumento, $this->idArtigo, $this->descricao, $this->qtdDisponivel, $this->qtd, $this->preco);
			return $result;
		}
	}