ProdutosTest
extends TestCase
in package
Prevent setting the class alias for all test suites
Tags
Table of Contents
Properties
- $db : mixed
Methods
- addProdutoEntradaEntregaItem() : mixed
- addProdutoEntradaItem() : mixed
- cadastrarProduto() : mixed
- test_TriggersCompraProdutoComControleEstoque() : mixed
- acao | qtde | c.unit.prod | c.medio.prod | saldo.prod | dep | c.unit.prod.dep | c.medio.prod.dep | saldo.dep ------------------------------------------------------------------------------------------------------------------------ entrada item | 50 | 12.0000 | 12.0000 | 50 | 1 | 12.0000 | 12.0000 | 50 entrada item | 50 | 12.0000 | 12.0000 | 100 | 2 | 12.0000 | 12.0000 | 50 entrada item | 100 | 8.0000 | 10.0000 | 200 | 1 | 8.0000 | 9.3333 | 150 transf. | -50 | 8.0000 | 10.0000 | 200 | 1 | 8.0000 | 9.3333 | 100 transf. | 50 | 8.0000 | 10.0000 | 200 | 2 | 8.0000 | 10.6667 | 100
- test_TriggersCompraProdutoSemControleEstoque() : mixed
- acao | qtde | c.unit.prod. | c.medio.prod | dep | c.unit.prod.dep | c.medio.prod.dep | saldo --------------------------------------------------------------------------------------------------- entrada | 100 | 12.0000 | 12.0000 | 1 | 0 | 0 | 0 entrada | 100 | 8.0000 | 8.0000 | 1 | 0 | 0 | 0
- test_TriggersManutencao() : mixed
- test_TriggersProducaoLoteAjustes() : mixed
- test_TriggersProdutosPerdasSobras() : mixed
- test_TriggersProdutosProducao() : mixed
- acao | id.prod | qtde || c.unit.prod | c.medio.prod | saldo.prod || dep | c.unit.prod.dep | c.medio.prod.dep | saldo.dep -------------------------------------------------------------------------------------------------------------------------------------- entrada prod.acab. | 10 | 50 || 200.0000 | 200.0000 | 50 || 1 | 200.0000 | 200.0000 | 50 entrada prod.acab | 10 | 50 || 200.0000 | 200.0000 | 100 || 2 | 200.0000 | 200.0000 | 50 entrada mat.prima | 1 | 1300 || 10.0000 | 8.0000 | 1300 || 1 | 10.0000 | 8.0000 | 1300 consumo mat.prima | 1 |-1000 || 10.0000 | 8.0000 | 300 || 1 | 10.0000 | 8.0000 | 300 producao prod.acab.| 10 | 100 || 85.0000 | 142.5000 | 200 || 2 | 85.0000 | 123.33333 | 150 consumo mat.prima | 1 |-300 || 10.0000 | 8.0000 | 0 || 1 | 10.0000 | 8.0000 | 0 producao prod.acab.| 10 | 20 || 130.0000 | 141.3636 | 220 || 2 | 130.0000 | 124.1176 | 170 transf | 10 |-70 || 130.0000 | 141.3636 | 220 || 2 | 130.0000 | 124.1176 | 100 transf | 10 | 70 || 130.0000 | 141.3636 | 220 || 1 | 130.0000 | 155.7352 | 120 entrada mat.prima | 1 | 1000 || 10.0000 | 8.0000 | 1000 || 1 | 10.0000 | 8.0000 | 1000 entrada mat.prima | 2 | 30000 || 2.75 | 2.75 | 30000 || 1 | 2.7500 | 2.7500 | 30000 consumo mat.prima | 1 |-1000 || 10.0000 | 8.0000 | 0 || 1 | 10.0000 | 8.0000 | 0 consume mat.prima | 2 |-20000 || 2.75 | 2.75 | 0 || 1 | 2.75 | 2.75 | 10000 producao prod.acab.| 10 | 100 || 635 | 295.6249 | 320 || 2 | 635.0000 | 379.5588 | 200
- test_TriggersServicoExecutaProdutos() : mixed
- test_TriggersVendaLote() : mixed
- tearDown() : void
- addProdutoDuasEntregasDoisDepositos() : mixed
Properties
$db
private
mixed
$db
= null
Methods
addProdutoEntradaEntregaItem()
public
addProdutoEntradaEntregaItem(mixed $prod_entrada_entrega_item, mixed $custom_fields) : mixed
Parameters
- $prod_entrada_entrega_item : mixed
- $custom_fields : mixed
addProdutoEntradaItem()
public
addProdutoEntradaItem(mixed $prod_entrada_item, mixed $custom_fields) : mixed
Parameters
- $prod_entrada_item : mixed
- $custom_fields : mixed
cadastrarProduto()
public
cadastrarProduto(mixed $prod, mixed $custom_fields) : mixed
Parameters
- $prod : mixed
- $custom_fields : mixed
test_TriggersCompraProdutoComControleEstoque()
acao | qtde | c.unit.prod | c.medio.prod | saldo.prod | dep | c.unit.prod.dep | c.medio.prod.dep | saldo.dep ------------------------------------------------------------------------------------------------------------------------ entrada item | 50 | 12.0000 | 12.0000 | 50 | 1 | 12.0000 | 12.0000 | 50 entrada item | 50 | 12.0000 | 12.0000 | 100 | 2 | 12.0000 | 12.0000 | 50 entrada item | 100 | 8.0000 | 10.0000 | 200 | 1 | 8.0000 | 9.3333 | 150 transf. | -50 | 8.0000 | 10.0000 | 200 | 1 | 8.0000 | 9.3333 | 100 transf. | 50 | 8.0000 | 10.0000 | 200 | 2 | 8.0000 | 10.6667 | 100
public
test_TriggersCompraProdutoComControleEstoque() : mixed
test_TriggersCompraProdutoSemControleEstoque()
acao | qtde | c.unit.prod. | c.medio.prod | dep | c.unit.prod.dep | c.medio.prod.dep | saldo --------------------------------------------------------------------------------------------------- entrada | 100 | 12.0000 | 12.0000 | 1 | 0 | 0 | 0 entrada | 100 | 8.0000 | 8.0000 | 1 | 0 | 0 | 0
public
test_TriggersCompraProdutoSemControleEstoque() : mixed
test_TriggersManutencao()
public
test_TriggersManutencao() : mixed
test_TriggersProducaoLoteAjustes()
public
test_TriggersProducaoLoteAjustes() : mixed
test_TriggersProdutosPerdasSobras()
public
test_TriggersProdutosPerdasSobras() : mixed
test_TriggersProdutosProducao()
acao | id.prod | qtde || c.unit.prod | c.medio.prod | saldo.prod || dep | c.unit.prod.dep | c.medio.prod.dep | saldo.dep -------------------------------------------------------------------------------------------------------------------------------------- entrada prod.acab. | 10 | 50 || 200.0000 | 200.0000 | 50 || 1 | 200.0000 | 200.0000 | 50 entrada prod.acab | 10 | 50 || 200.0000 | 200.0000 | 100 || 2 | 200.0000 | 200.0000 | 50 entrada mat.prima | 1 | 1300 || 10.0000 | 8.0000 | 1300 || 1 | 10.0000 | 8.0000 | 1300 consumo mat.prima | 1 |-1000 || 10.0000 | 8.0000 | 300 || 1 | 10.0000 | 8.0000 | 300 producao prod.acab.| 10 | 100 || 85.0000 | 142.5000 | 200 || 2 | 85.0000 | 123.33333 | 150 consumo mat.prima | 1 |-300 || 10.0000 | 8.0000 | 0 || 1 | 10.0000 | 8.0000 | 0 producao prod.acab.| 10 | 20 || 130.0000 | 141.3636 | 220 || 2 | 130.0000 | 124.1176 | 170 transf | 10 |-70 || 130.0000 | 141.3636 | 220 || 2 | 130.0000 | 124.1176 | 100 transf | 10 | 70 || 130.0000 | 141.3636 | 220 || 1 | 130.0000 | 155.7352 | 120 entrada mat.prima | 1 | 1000 || 10.0000 | 8.0000 | 1000 || 1 | 10.0000 | 8.0000 | 1000 entrada mat.prima | 2 | 30000 || 2.75 | 2.75 | 30000 || 1 | 2.7500 | 2.7500 | 30000 consumo mat.prima | 1 |-1000 || 10.0000 | 8.0000 | 0 || 1 | 10.0000 | 8.0000 | 0 consume mat.prima | 2 |-20000 || 2.75 | 2.75 | 0 || 1 | 2.75 | 2.75 | 10000 producao prod.acab.| 10 | 100 || 635 | 295.6249 | 320 || 2 | 635.0000 | 379.5588 | 200
public
test_TriggersProdutosProducao() : mixed
Exemplo de alguns calculos:
(100 * 85 + 50 * 200) / (100 + 50) = 123.3333 (20 * 130 + 150 * 123.3333) / (20 + 150) = 124.1176 (70 * 124.1176 + 50 * 200) / (70 + 50) = 155.7352 (100 * 635 + 100 * 124.1176) / (100 + 100) = 379.5588
test_TriggersServicoExecutaProdutos()
public
test_TriggersServicoExecutaProdutos() : mixed
test_TriggersVendaLote()
public
test_TriggersVendaLote() : mixed
tearDown()
protected
tearDown() : void
addProdutoDuasEntregasDoisDepositos()
private
addProdutoDuasEntregasDoisDepositos(mixed &$db) : mixed
Parameters
- $db : mixed