Пример #1
0
 public function cadastrarPedido($idCliente, $total, $idPlano, $qtdeMeses)
 {
     $obj = new Pedido();
     $obj->idCliente = $idCliente;
     $obj->idPedidoStatus = 1;
     $obj->total = $total;
     $obj->idPlano = $idPlano;
     $obj->qtdeMeses = $qtdeMeses;
     $obj->dataCadastro = DATAHORAMYSQL;
     if (!$obj->inserir()) {
         return false;
     }
     Pedido::cadastrarHistorico($obj->id, $obj > idPedidoStatus);
     return true;
 }