
cmd  enctar como administrador para arreglar lentitud al borrar carpetas
DISM.exe       /Online /Cleanup-image /Scanhealth
DISM.exe       /Online /Cleanup-image /Restorehealth
Sfc        /Scannow


-->composer global require laravel/installer
-->laravel new facture
->composer require Laravel/ui
-->php artisan ui vue --auth
-->npm install 
--> npm run dev

-->node -v
-->npm -v


..>npm install
-->php artisan make:controller UserController
-->php artisan make:model Pastel
-->php artisan make:model tipe_documents -m  |--->crea el modelo y la mi





    php artisan make:model -mc test ******************>  crea en una sola linea  la migracion, modelo, y controlador




  php artisan make:seeder PesonaSeeder



-->hpp artisan migrate --seed   para migrar los  seed
   php artisan migrate --seed
php artisan make:seeder PesonaSeeder

php artisan make:seeder PesonaSeeder
php artisan make:seeder MunisiSeeder

-->php artisan make:seed Medida   pra crear el seed
-->php artisan migrate:reset
-->migrate:refresh  o migrate:fresh
-->php artisan migrate:fresh --seed
-->php artisan make:model Medi
-->npm install sweetalert2 - npm
-->composer require realrashid/sweet-alert
-->php artisan key:generate
-->php artisan config:clear
-->php artisan list

-->pm install sweetalert2
-->npm install vue-barcode
-->npm install --save vue-pdf
-->>npm install vue-select
-->npm install --save vue-search-select

-->php artisan cache:clear
-->php artisan config:cache


npm install
npm install v-select2-component --save



TRIGGER PARA SUMAR STOCK
***********************************************************
DELIMITER //
CREATE TRIGGER tr_updStockIngreso AFTER INSERT ON  detalle_ingresos
FOR EACH ROW BEGIN
UPDATE articulos SET stock = stock + NEW.cantidad
WHERE articulos.id = NEW.idarticulo;
END
//
DELIMITER ;
**********************************************************
TRIGGER PARA  RESTABLECER UN STOCK ANTERIOR 

DELIMITER //
CREATE TRIGGER tr_updStockIngresoAnular AFTER UPDATE ON ingresos FOR EACH ROW
BEGIN
UPDATE articulos a
JOIN detalle_ingresos di
ON di.idarticulo = a.id
AND di.idingreso = new.id
set a.stock = a.stock - di.cantidad;
end;
//
DELIMITER ;



EN VENTA
TRIGGER PARA SUMAR STOCK
***********************************************************


DELIMITER //
CREATE TRIGGER tr_updStockVenta AFTER INSERT ON  detalle_ventas
FOR EACH ROW BEGIN
UPDATE articulos SET stock = stock - NEW.cantidad
WHERE articulos.id = NEW.idarticulo;
END
//
DELIMITER ;



PARA  ANULAR LA VENTA O REGRESAR EL ARTICULO AL INVENTARIO
**********************************************************
TRIGGER PARA  RESTABLECER UN STOCK ANTERIOR 

DELIMITER //
CREATE TRIGGER tr_updStockVentaAnular AFTER UPDATE ON ventas FOR EACH ROW
BEGIN
UPDATE articulos a
JOIN detalle_ventas dv
ON dv.idarticulo = a.id
AND dv.idventa = new.id
set a.stock = a.stock + di.cantidad;
end;
//
DELIMITER ;


como instalar dompdf*******************************************
https://desarrolloweb.com/articulos/generar-pdf-laravel-dompdf.html
para instalar "barryvdh/laravel-dompdf": "^0.8.3",
lugo desde el terminal colocamos : 
composer update

ejemplos
https://www.youtube.com/watch?v=dLpnallkH6M

Paso 2: Instale el paquete dompdf****************
olutionstuff.com/post/how-to-make-pdf-file-in-laravel-7example.html
compositor requiere barryvdh / laravel-dompdf
composer create-project --prefer-dist laravel/laravel laravelPDF



unserialize (): Error en el desplazamiento 0 de 40 bytes Error

*************si el proyecto no arranca  en el navegador tienes que ejecutar   esto ***********
php artisan key:generate

****************************luego vuelve y lo ejecutas y listo 





Instalación de dompdf
Instalamos dompdf con:
https://parzibyte.me/blog/2019/12/25/generar-pdf-php-dompdf/
composer require dompdf/dompdf

Paso: 1 Descargue el paquete laravel-dompdf
omposer require barryvdh/laravel-dompdf

Paso: 2 Configure la aplicación del paquete laravel 7/6
'providers' => [
    ....
    Barryvdh\DomPDF\ServiceProvider::class,
],
'aliases' => [
    ....
    'PDF' => Barryvdh\DomPDF\Facade::class,
],


otro para pdf
https://xpertphp.com/laravel-7-pdf-generator-tutorial-using-dompdf/

otro video bueno en colores pdf
https://www.youtube.com/watch?v=-oQ4cc3Hpjw


https://desarrollowebtutorial.com/generar-pdf-en-laravel/







node -v
npm -v
npm install
npm run dev
npm run production
npm run watch
Puedes encontrar que en algunos entornos Webpack no está actualizando los cambios en tus archivos. Si éste es el caso en tu sistema, considera usar el comando 
npm run watch-poll
npm run watch-poll


php artisan make:migration create_categorias_table



			php artisan make:migration create_invoice_lines_table

tax_totals






	php artisan make:migration create_cotizacion_table

	php artisan make:migration create_cxc_excel_table

		
	php artisan make:migration create_departamentos_table




	php artisan make:migration create_impuestos_table



	php artisan make:migration create_invoice_lines_table


php artisan make:migration create_articulos_table
php artisan make:model Categoria

php artisan make:model Departamento


-->php artisan make:controller ArticuloController



     php artisan make:seeder CategoriaSeeder



php artisan make:migration create_articulos_table


php artisan make:migration create_type_meals_table

php artisan make:model Articulo
php artisan make:controller CategoriaController --resource
php artisan make:middleware Administrador
php artisan make:middleware Almacenista
>php artisan make:middleware Vendedor



laravel --version
php artisan --version
lavravel new laravel7instalador --dev
compouser create-proyect laravel/laravel laravel7
compouser create-proyect laravel/laravel laravel7 dev-develop

php artisan make:moke:model Emppleados -mcr


php artisan route:list

Para crear todas las listas de una

Route::resource('empleados', 'EmpleadosController');






composer create-project laravel/laravel facturacion  "6.*"

direccion para documentacion importante de un crud y vue   para entender mejor
https://bluuweb.github.io/tutorial-laravel/factorias/#crear-factory

https://www.youtube.com/watch?v=EWSSxd0Cb1o&list=PLzSFZWTjelbIi1UJ3WZZK8vVzgmhjAq25&index=1

sena
https://www.youtube.com/watch?v=XakjtrGXNFk
***************************************************
curso laravel Ing. LUIS

composer create-project --prefer-dist laravael/laravel sistema "5.6.*"

https://coreui.io/ (PLANTILLAS)

-----
git clone https://github.com/webdesarrollo/Laravel-vue.git
composer update
cp .env.example .env


composer create-project laravel/laravel facturacion  "6.*"


Borrar con laravel
https://www.youtube.com/watch?v=B4tB4YeSIUU


incanato codigo sisventas
https://www.incanatoit.com/2016/11/codigo-sistema-compras-ventas-laravel-mysql-jquery-bootstrap.html




impresion  este es el que esta instalado en sisventas
******************************************************

https://styde.net/genera-pdfs-en-laravel-con-el-componente-dompdf/
composer require barryvdh/laravel-dompdf
https://www.srcodigofuente.es/aprender-php/guia-dompdf-completa

https://lacodigoteca.com/php/crear-ticket-en-pdf-con-php/

tamaño hoja
$dompdf->set_paper(array(0, 0, 595, 841), 'portrait')


video para generacion de ticket
https://www.youtube.com/watch?v=6fSX_uTzLxg
-




1--php artisan make:migration
2--php artisan migrate
3--php artisan make:model Categoria
4-->php artisan make:controller CategoriaController --resource
5-->instalar  json viewer  buscar en google  e instalar

curso
https://comfamiliarhuila-my.sharepoint.com/personal/luis_rojas_comfamiliarhuila_com/_layouts/15/onedrive.aspx?originalPath=aHR0cHM6Ly9jb21mYW1pbGlhcmh1aWxhLW15LnNoYXJlcG9pbnQuY29tLzpmOi9wL2x1aXNfcm9qYXMvRW51bkE3R0NSN0ZMaHFsQzIyQ29IdnNCTWZIMll1dVhrTU8xc1NGM3dZLWRJQT9ydGltZT1zeFJtQm5QdzEwZw&viewid=dae93139%2Deee2%2D4451%2D84cc%2D480c26e4e6b8&id=%2Fpersonal%2Fluis%5Frojas%5Fcomfamiliarhuila%5Fcom%2FDocuments%2FDesarrollo%20web%20en%20PHP%20con%20Laravel%205%2E6%2C%20VueJS%20y%20MariaDB%20Mysql%2F6%2E%20Mantenimiento%20CRUD%20tabla%20independiente




----https://www.youtube.com/watch?v=e2EowltnxiU     ACTIVACION DE CAMARAS


seventerega
***********
http://retail.servientrega.com:8081/Managers/Account/LogOn.aspx
usuario   QUINTKJ
CLAAVE  1990112



configuracin de impresora  generica
***********************************
***********************************

https://helpmybusinesspos.info/tag/configurar-impresora-de-tickets-generica/








**********************una forma de instalar  dompdf*********************

https://styde.net/genera-pdfs-en-laravel-con-el-componente-dompdf/
composer require barryvdh/laravel-dompdf


<?php
// Cargamos la librería dompdf que hemos instalado en la carpeta dompdf

require_once ('dompdf/dompdf_config.inc.php');
 
// Introducimos HTML de prueba
$html = '<h1>Hola mundo!</h1>';
 
// Instanciamos un objeto de la clase DOMPDF.
$pdf = new DOMPDF();
 
// Definimos el tamaño y orientación del papel que queremos.
$pdf->set_paper("C7", "portrait");



$paper_size = array(0,0,360,360);
$dompdf->set_paper($paper_size);



 
// Cargamos el contenido HTML.
$pdf->load_html(utf8_decode($html));
 
// Renderizamos el documento PDF.
$pdf->render();
 
// Enviamos el fichero PDF al navegador.
$pdf->stream('FicheroEjemplo.pdf');



para eliminar  el cahce********


php artisan view:clear


curso de  vue  ing luis
https://www.youtube.com/watch?v=GAQB7Y4X5fM




curso de  ing luis  viutifer  CLONAR PROYECTO
*********************************************
*********************************************
comandos comunes de****  https://gist.github.com/dasdo/9ff71c5c0efa037441b6

https://youtu.be/62uA7rG45tA     video de ing luliscurso del ing  viutifur

1-git clone https://93343122@bitbucket.org/lara44/inventario.git
2-cd inventaio
3-git branch dev_sterling
4-git branch
5-git checkout dev_sterling
6-composer install
7.cp .env.example .env
8.php artisan key:generate
9.npm install
10-npm audit fix
11. php artisan migrate --seed
12. php artisan passport:install 
12. php artisan passport:install --force               por segunda vez
13.php artisan migrate:reset
14>php artisan migrate


  php artisan migrate --     y el nombre de la migracion que quiera correr



		 php artisan make:controller api/v1/MensajesController




		 php artisan make:controller api/v1/PerdidasController




 
15.  php artisan make:controller api/v1/CategoryController



16-  php artisan make:model Model/Gestion/InvoiceLine





php artisan make:model Model/Gestion/Category
php artisan make:model Model/Gestion/Type_document

php artisan make:model Model/Gestion/Municipio



	php artisan make:model Model/Gestion/CxcExportar


	php artisan mak protected $table = cxc_excel   ;
    protected $fillable = [
        'sale_id', 
        'product_id',
        'quantity',
        'price'

    ];
    
    public $timestamps = false;

    public function sales() {
        return $this->belongsTo('App\Model\Gestion\Sale','sale_id','id');
    }

    public function products() {
        return $this->belongsTo('App\Model\Gestion\Product','product_id','id');
    }e:model Model/Gestion/detailCotizacion




		php artisan make:model Model/Gestion/invoice_line


17.php artisan migrate:fresh --seed
	
php artisan make:seeder PesonaSeeder

   php artisan make:seeder ImpuestoSeeder
   php artisan make:seeder ModuleTableSeeder

	   php artisan make:seeder DepartamentoTableSeeder



18. composer dump-autoload          --para borrar el cache *******************************************
19.php artisan make:seed Category
   php artisan make:seed Categoria

20.git status
21.git diff


C:\laragon\www\inventario>git status

C:\laragon\www\inventario>git add .
C:\laragon\www\inventario>git commit -m "changes subcategories route"
C:\laragon\www\inventario>git push origin dev_sterling
C:\laragon\www\inventario>git status



https://disenowebakus.net/tipos-de-datos-mysql.php      formatos para crear tablas




https://vuetifyjs.com/en/getting-started/quick-start/
 npm install vuetify



///////////////////////

<template>
    <div>
        <v-card>
            <v-container>
                <v-card-title>
                Encuestas
                <v-spacer></v-spacer>
                <v-text-field
                    v-model="search"
                    append-icon="mdi-magnify"
                    label="Search"
                    single-line
                    hide-details
                
                ></v-text-field>
                </v-card-title>
                <v-simple-table>
                    <template v-slot:default>
                    <thead>
                        <tr>
                            <th>Options</th>
                            <th class="text-left">Nombre de encuesta</th>
                            <th class="text-left">Fecha Creación</th>
                            <th class="text-center">Fecha Modificación</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="item in polls.data" :key="item.id">
                            <td>
                                <v-btn 
                                text 
                                color="orange" 
                                
                                
                                ><v-icon>mdi-pencil</v-icon>
                                </v-btn>
                            </td>
                            <td>{{ item.name }}</td>
                            <td>{{ item.created_at }}</td>
                            <td>{{ item.update_at }}</td>
                        </tr>
                    </tbody>
                    </template>
                </v-simple-table>
                <paginate store="poll" collection="polls"/>
            </v-container>
        </v-card>
        <v-row justify="center">
            <v-dialog v-model="dialog" width="800px">
                <v-card>
                    <v-card-title class="primary" style="color: #fff;" 
                    v-text="titleModal"> 
                    </v-card-title>
                    <v-card-actions>
                        <div class="my-2">
                            <v-btn
                            text
                            color="error" 
                            @click="dialog = false"
                            >Cancel</v-btn>
                        </div>
                        <div class="my-2">
                            <v-btn
                            text
                            color="success"
                             
                            v-if="tipoAccion==2"
                            @click="updateRole"
                            >Update</v-btn>
                        </div>
                    </v-card-actions>
                    <v-container>
                    <v-row class="mx-2">
                        <v-col cols="12">
                            <div class="div-error">
                                <div class="text-error">
                                    <div v-for="(errors, id) in errorMessajePoll" :key="id" v-text="errors"></div>
                                </div>
                            </div>
                        </v-col>  
                        <v-col cols="6">
                            <v-text-field 
                                label="Name Role"
                                hide-details="auto"
                                v-model="poll.name"
                            />
                        </v-col>          
                    </v-row>
                    </v-container>
                  </v-card>       
            </v-dialog>
        </v-row>    
    </div>
</template>

<script>
    import { mapState } from 'vuex'
    export default {
        data () {
            return {
                dialog: false,
                titleModal: '',
                tipoAccion: '',
                errorMessajePoll: [],
                search: '',
                poll: {
                    name:'',
                    document: ''
                }
            }
        },
        computed: {
            ...mapState('poll', ['polls']),
            // ...mapState('currentUser', ['permissions']),
        },
        mounted() {
            console.log('Component mounted.')
        },
        created(){
            this.$store.dispatch('poll/getList', [0 , this.search]);
        }
    }
</script>
///////////////////////




BUSCADOR
https://solibeth.net/laravel-6-22-filtros-de-busqueda













/////////////////////////////////////////

PARA  SUBIR  O CREAR UN PROGRAMA NUEVO EN GIT



git branch dev_compra

git checkout dev_compra
git status
git add .
git commit -m "changes purchasers"
git push origin dev_compra
********************************************* ASI SE SUBE UN PROYECTO A  GIT













