This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function progress(){ | |
| $("#progressBar").show(); | |
| var intervalo = setInterval(function(){ | |
| $.ajax("/progress").done(function(data){ | |
| $("#progressBar").attr("data-percent", data) | |
| $("#messageBar").html(data + "% completo"); | |
| $('#progressBar').progress(); | |
| if(data == 100){ | |
| clearInterval(intervalo) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form method="POST" id="cliente" class="ui form"> | |
| <h4 class="ui dividing header">Cadastro Cliente</h4> | |
| <div class="ui error message"></div> | |
| <h5><b>Dados</b></h5> | |
| <div class="fields"> | |
| <div class="four wide field"> | |
| <label for="cnpjcpf">CNPJ / CPF *</label> | |
| <div class="ui icon input cliente"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE IF NOT EXISTS `estado` ( | |
| `id_estado` INT(16) NOT NULL, | |
| `nome_estado` VARCHAR(64) NOT NULL, | |
| `uf_estado` VARCHAR(2) NOT NULL, | |
| `codigo_estado` CHAR(2) NOT NULL, | |
| `ICMS` INTEGER NULL, | |
| `FCP` INTEGER NULL, | |
| `updated_at` TIMESTAMP() NULL, | |
| `created_at` TIMESTAMP() NULL, | |
| PRIMARY KEY (`id_estado`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pesquisaCPF(cpf){ | |
| this.clienteService.pesquisaCPF(cpf) | |
| .subscribe((data)=>{ | |
| this.dados.push(data) | |
| if(this.dados[0].status == 1){ | |
| this.clienteService.pesquisaCPF(cpf) | |
| .subscribe((data)=>{ | |
| console.log(JSON.stringify(data)) | |
| this.resposta = data; | |
| $.prompt("O CPF informado pertence ao cliente/fornecedor " + this.resposta.cliente[0].nome_fantasia, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $nfe = new \NFePHP\NFe\Make(); | |
| $std = new \stdClass(); | |
| // $std->versao = '3.10'; | |
| $std->versao = '4.00'; | |
| $nfe->taginfNFe($std); | |
| $std = new \stdClass(); | |
| $std->cUF = 21; | |
| $std->cNF = '80070008'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Javascript | |
| function progress(data){ | |
| timer = setInterval(readCookie, 100) | |
| } | |
| function readCookie(cookie){ | |
| $.ajax({ | |
| url: '/progress', | |
| success: function(data){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function cadastrarEmpresa(Request $request) | |
| { | |
| $empresa = new Empresa; | |
| foreach($request->all() as $dados => $value){ | |
| (($dados == '_token') ? '' : $empresa->$dados = $request->$dados); | |
| } | |
| $empresa->save(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $noticias->filter('article > div > h4 > a')->each(function ($response) { | |
| $noticia = $response->text(); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //HomeController | |
| public function enviarContato(Request $request) | |
| { | |
| Mail::to($request->email) | |
| ->cc('contato@adonaicoc.com.br') | |
| ->send(new Contato); | |
| $errors = new MessageBag(['mensagem' => ['E-mail enviado com sucesso.']]); | |
| return Redirect::back()->withErrors($errors)->withInput(Input::except('mensagem')); |