-
Notifications
You must be signed in to change notification settings - Fork 1
/
Edit.php
33 lines (25 loc) · 1.09 KB
/
Edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
class Vendas_Form_Pagamento_Edit extends Vendas_Form_Pagamento_Crud_Edit {
/**
* Carrega os elementos no formulário para serem renderizado
* @return void
*/
public function loadElements($action = 'insert') {
parent::loadElements($action);
$idPedido = Zend_Controller_Front::getInstance()->getRequest()->getParam('id_pedido');
if ($idPedido) {
$_mapper = new Vendas_DataView_Pagamento_MapperView();
$vlrTotal = $_mapper->getSaldoPagar($idPedido);
$_mapper->setVlrTotal($vlrTotal);
$vlrTotal = $_mapper->getVlrTotal()->get();
$perDesc = 0;
$_mapper->setPerDesc($perDesc);
$perDesc = $_mapper->getPerDesc()->get();
$this->getElement('vlr_total')->setValue($vlrTotal);
$this->getElement('vlr_a_pagar')->setValue($vlrTotal);
$this->getElement('per_desc')->setValue($perDesc);
$this->getElement('per_acre')->setValue($perDesc);
}
}
}
?>