Skip to content

Commit

Permalink
Merge pull request #1 from Fire-Codes/redisenoFactura
Browse files Browse the repository at this point in the history
Rediseño de la factura y correccion de errores
  • Loading branch information
edycarreyes99 authored Mar 22, 2019
2 parents 16b599e + 9476f8c commit 0e40f88
Show file tree
Hide file tree
Showing 12 changed files with 290 additions and 20 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "acrmotos",
"version": "0.0.0",
"version": "1.0.4",
"main": "main.js",
"productName": "ACR Motos",
"description": "Sistema de Inventario para la empresa ACR Motos",
Expand All @@ -14,7 +14,7 @@
"electron": "electron .",
"electron-build": "ng build --optimization=true --prod=true --vendor-source-map",
"electron-build-run": "npm run electron-build && npm run electron",
"electron-package-windows": "npm run electron-build && electron-packager . --no-prune --ignore=/node_modules --ignore=/e2e --ignore=/src --overwrite --icon ./src/assets/icon.ico",
"electron-package-windows": "npm run electron-build && electron-packager . --no-prune --ignore=/node_modules --ignore=/e2e --ignore=/src --overwrite --icon ./src/assets/favicon.ico",
"electron-package-linux": "electron-packager . --no-prune --ignore=/node_modules --ignore=/e2e --ignore=/src --overwrite --platform=linux --arch=x64 --icon=src/assets/Logotipo/Logotipo.png"
},
"private": true,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,199 @@
<div class="invoice-box">
<body>
<div class="bg-transparent row mt-5">
<div class="bg-transparent col-sm-12 col-md-12 col-lg-12">
<div class="text-center text-darkBlue">
<div class="bg-transparent display-3">
<b>ACR Motos</b>
</div>
<h6>
Dirección: Cruz Roja 20 mts. al Norte<br>
Email: acrmotosnic@gmail.com<br>
Tel: 23468367<br>
</h6>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<div class="float-left text-darkBlue">
<h3>RUC: 0842006960000W</h3>
</div>
<div class="float-right text-danger">
<h3>N° {{facturaImprimir.NumeroFactura}}</h3>
<!--{{facturaImprimir.NumeroFactura}}-->
</div>
</div>
</div>
<div class="row mt-1">
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="card border-darkBlue mb-1 rounded-lg" style="width: 100%; height: 12rem;">
<div class="card-body text-darkBlue">
<h4>
Cliente: {{facturaImprimir.Cliente.NombreCompleto}}<br>
Dirección: {{facturaImprimir.Cliente.Direccion}}<br>
Teléfono: {{facturaImprimir.Cliente.Telefono}}
</h4>
</div>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="card border-darkBlue mb-1 rounded-lg" style="width: 100%; height: 12rem;">
<div class="card-body text-darkBlue">
<h4>
Fecha: {{facturaImprimir.Fecha}}<br>
Vendedor: {{facturaImprimir.Vendedor.Nombres}} {{facturaImprimir.Vendedor.Apellidos}}<br>
Vencimiento: {{facturaImprimir.Fecha}}
</h4>
</div>
</div>
</div>
</div>
<div class="border border-darkBlue rounded rounded-lg bg-transparent" style="height: 50vh; width: 100%;">
<div class="container-fluid bg-darkBlue">
<mat-card-title>
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="text-center text-white">
<h4>DESCRIPCION</h4>
</div>
</div>
<div class="col-sm-2 col-md-2 col-lg-2">
<div class="text-center text-white">
<h4>CANT</h4>
</div>
</div>
<div class="col-sm-2 col-md-2 col-lg-2">
<div class="text-center text-white">
<h4>P/UNITARIO</h4>
</div>
</div>
<div class="col-sm-2 col-md-2 col-lg-2">
<div class="text-center text-white">
<h4>TOTAL</h4>
</div>
</div>
</div>
</mat-card-title>
</div>
<div class="d-flex align-items-center justify-content-center">
<img
src="https://firebasestorage.googleapis.com/v0/b/acr-motos.appspot.com/o/Logotipo.png?alt=media&token=fdd841c3-4197-4e37-918c-0d0e86863e5e"
alt="Marca de Agua" style="font-size: 15em; z-index: 9998; opacity: 0.1; width: 50%; position: fixed;">
</div>
<div class="row" *ngFor="let producto of facturaImprimir.Productos">
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="text-dark">
{{producto.Producto}} {{producto.Marca}} {{producto.Modelo}}
</div>
</div>
<div class="col-sm-2 col-md-2 col-lg-2">
<div class="text-center text-black">
{{producto.Cantidad}}
</div>
</div>
<div class="col-sm-2 col-md-2 col-lg-2">
<div class="text-center text-black">
{{producto.Precio}}
</div>
</div>
<div class="col-sm-2 col-md-2 col-lg-2">
<div class="text-center text-black">
{{producto.Precio * producto.Cantidad}}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-3 col-md-3 col-lg-3">
<div class="card border-darkBlue mb-3" style="width: 100%; height: 8rem;">
<div class="card-header">
<div class="text-center text-darkBlue">
<h5>Autorizado Por</h5>
</div>
</div>
</div>
</div>
<div class="col-sm-3 col-md-3 col-lg-3">
<div class="card border-darkBlue mb-3" style="width: 100%; height: 8rem;">
<div class="card-header">
<div class="text-center text-darkBlue">
<h5>Vendedor</h5>
</div>
</div>
</div>
</div>
<div class="col-sm-3 col-md-3 col-lg-3">
<div class="card border-darkBlue mb-3" style="width: 100%; height: 8rem;">
<div class="card-header">
<div class="text-center text-darkBlue">
<h5>Recibí Conforme</h5>
</div>
</div>
</div>
</div>
<div class="col-sm-3 col-md-3 col-lg-3">
<div class="border border-darkBlue rounded rounded-lg card mt-1" style="width: 100%; height: 8rem;">
<div class="row" style="z-index: 9999">
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="bg-darkBlue text-white ">
<h5>Sub Total</h5>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<div class=" text-dark">
<h5>
C$ {{totalSinDescuento()}}
</h5>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="bg-darkBlue text-white ">
<h6>DESCUENTO</h6>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<div class=" text-dark">
<h5>
C$ {{facturaImprimir.Descuento}}
</h5>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="bg-darkBlue text-white ">
<h4>Interés</h4>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<div class=" text-dark">
<h5>C$ {{facturaImprimir.Interes}}</h5>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-6">
<div class="bg-darkBlue text-white ">
<h5>TOTAL</h5>
</div>
</div>
<div class="col-sm-6 col-md-6 col-lg-6">
<div class=" text-dark">
<h5>C$ {{(totalSinDescuento() - facturaImprimir.Descuento) + facturaImprimir.Interes}}</h5>
</div>
</div>
</div>
</div>
</div>
</div>
</body>






<!--<div class="invoice-box">
<table cellpadding="0" cellspacing="0">
<tr class="top">
<td colspan="2">
Expand Down Expand Up @@ -121,7 +316,7 @@
</td>
</tr>
</table>
</div>
</div>-->
<div class="float-right">
<button (click)="navegar()" class="btn btn-primary m-3" id="btnRegresar">Regresar</button>
<button (click)="imprimir()" class="btn btn-warning m-3" id="btnImprimir">Imprimir</button>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
.invoice-box {
.imagen {
content: url("https://firebasestorage.googleapis.com/v0/b/acr-motos.appspot.com/o/Logotipo.png?alt=media&token=fdd841c3-4197-4e37-918c-0d0e86863e5e");
font-size: 15em;
color: rgba(52, 166, 214, 0.4);
z-index: 9999;
background-color: rgb(255, 0, 0);
opacity: 0.6; /* Opacidad 60% */

display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;

-webkit-pointer-events: none;
-moz-pointer-events: none;
-ms-pointer-events: none;
-o-pointer-events: none;
pointer-events: none;

-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}

/*.invoice-box {
max-width: 100%;
padding: 30px;
font-size: 16px;
Expand Down Expand Up @@ -65,7 +95,7 @@
}
}
/** RTL **/
.rtl {
direction: rtl;
font-family: Tahoma, "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
Expand All @@ -77,4 +107,4 @@
.rtl table tr td:nth-child(2) {
text-align: left;
}
}*/
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class ImprimirFacturaComponent implements OnInit {
imprimir() {
const btnRegresar = document.getElementById('btnRegresar');
const btnImprimir = document.getElementById('btnImprimir');
// const contenido = document.getElementById('contenido').style.overflow = 'none';
btnRegresar.hidden = true;
btnImprimir.hidden = true;
window.print();
Expand Down
12 changes: 7 additions & 5 deletions src/app/pages/inventario/inventario.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ <h4 class="modal-title">Agregar Producto</h4>
<tr>
<td>
<mat-form-field>
<input type="number" placeholder="Precio de Compra" matInput required [(ngModel)]="PCompra"
name="PCompra">
<input type="number" placeholder="Precio de Venta" matInput required [(ngModel)]="PVenta" name="PVenta"
(keyup)="calcularPrecioCompra()">
</mat-form-field>

</td>
<td>
<mat-form-field>
<input type="number" placeholder="Precio de Venta" matInput required [(ngModel)]="PVenta" name="PVenta">
<input type="number" placeholder="Precio de Compra" matInput required [(ngModel)]="PCompra"
name="PCompra">
</mat-form-field>
</td>
</tr>
Expand Down Expand Up @@ -404,8 +406,8 @@ <h4 class="modal-title">Editar Producto {{producto.Id}}</h4>
<button (click)='openVerticallyCentered(agregarProducto,producto)' class="elevated text-center bg-info mr-3"
matTooltip="Agregar Producto" mat-fab><i matListIcon class="fas fa-plus text-dark"></i>
</button>
<button (click)="exportarExcel()" class="elevated text-center bg-info"
matTooltip="Exporta Inventario a Excel" mat-fab *ngIf="hayDatos">
<button (click)="exportarExcel()" class="elevated text-center bg-info" matTooltip="Exporta Inventario a Excel"
mat-fab *ngIf="hayDatos">
<mat-icon>poll</mat-icon>
</button>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/app/pages/inventario/inventario.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@ export class InventarioComponent implements OnInit {
}
}

// funcion para calcular el precio de compra
calcularPrecioCompra() {
this.PCompra = 0;
this.PCompra = this.PVenta * 0.60;
}

// funcion para editar los datos de un producto
editarProductos() {
this.fs.doc(`ACR Motos/Control/Inventario/${this.servicio.tienda}/Productos/${this.producto.Id}`).update(this.producto)
Expand Down
18 changes: 10 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="http://www.cloudformatter.com/Resources/Pages/CSS2Pdf/Script/xepOnline.jqPlugin.js"></script>
<link href="https://unpkg.com/ionicons@4.2.2/dist/css/ionicons.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"
integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS"
crossorigin="anonymous">

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
</head>

<body>
<app-root></app-root>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
crossorigin="anonymous"></script>
</body>

Expand Down
23 changes: 23 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* You can add global styles to this file, and also import other style files */

@import "~@angular/material/prebuilt-themes/deeppurple-amber.css";
.elevated {
box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
}

#toast-container>div {
opacity: 1;
}

.cdk-overlay-container {
z-index: 2000;
}

.text-darkBlue {
color: #002171;
}

.bg-darkBlue {
background-color: #002171;
color: #ffffff;
}
1 change: 1 addition & 0 deletions src/styles.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0e40f88

Please sign in to comment.