Skip to content

Commit

Permalink
cambios
Browse files Browse the repository at this point in the history
  • Loading branch information
edycarreyes99 committed Mar 14, 2019
1 parent 847751f commit 89a9bf5
Show file tree
Hide file tree
Showing 34 changed files with 3,053 additions and 2,629 deletions.
2 changes: 2 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ImprimirInventarioComponent } from './pages/impresiones/imprimir-invent
import { DetallesCompraComponent } from './pages/detalles-compra/detalles-compra.component';
import { PedidosComponent } from './pages/pedidos/pedidos.component';
import { HistorialFacturasComponent } from './pages/historial-facturas/historial-facturas.component';
import { ImprimirServicioComponent } from './pages/impresiones/imprimir-servicio/imprimir-servicio.component';

const routes: Routes = [
{ path: '', component: LoginComponent },
Expand All @@ -44,6 +45,7 @@ const routes: Routes = [
{ path: 'detallesCompra', component: DetallesCompraComponent },
{ path: 'pedidos', component: PedidosComponent },
{ path: 'historialFacturas', component: HistorialFacturasComponent },
{ path: 'imprimirServicio', component: ImprimirServicioComponent },
{ path: '**', component: PageNotFoundComponent }
];

Expand Down
10 changes: 8 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ import { ServiciosTecnicosComponent } from './pages/tablas/servicios-tecnicos/se
import { PedidosComponent } from './pages/pedidos/pedidos.component';
import { HistorialFacturasComponent } from './pages/historial-facturas/historial-facturas.component';
import { TablaHistorialFacturasComponent } from './pages/tablas/tabla-historial-facturas/tabla-historial-facturas.component';
import { ImprimirServicioModalComponent } from './pages/modales/imprimir-servicio-modal/imprimir-servicio-modal.component';
import { ImprimirServicioComponent } from './pages/impresiones/imprimir-servicio/imprimir-servicio.component';

@NgModule({
declarations: [
Expand Down Expand Up @@ -98,7 +100,9 @@ import { TablaHistorialFacturasComponent } from './pages/tablas/tabla-historial-
ServiciosTecnicosComponent,
PedidosComponent,
HistorialFacturasComponent,
TablaHistorialFacturasComponent
TablaHistorialFacturasComponent,
ImprimirServicioModalComponent,
ImprimirServicioComponent
],
imports: [
BrowserModule,
Expand Down Expand Up @@ -132,7 +136,9 @@ import { TablaHistorialFacturasComponent } from './pages/tablas/tabla-historial-
TablaClientesComponent,
DetallesCompraComponent,
ProductosCompradosComponent,
TablaHistorialComprasClienteComponent
TablaHistorialComprasClienteComponent,
ImprimirServicioModalComponent,
ImprimirServicioComponent
],
bootstrap: [AppComponent]
})
Expand Down
8 changes: 8 additions & 0 deletions src/app/interfaces/historial-servicio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ export interface HistorialServicio {
Interes: number;
ManoObra: number;
Descripcion: string;
Hora: number;
Minuto: number;
Segundo: number;
Dia: number;
Mes: string;
Ano: number;
Fecha: string;
Tiempo: string;
}
3 changes: 0 additions & 3 deletions src/app/interfaces/usuario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,5 @@ export interface Usuario {
'Segundo Nombre': string;
'Primer Apellido': string;
'Segundo Apellido': string;
TotalAcumulado: number;
Ventas: number;
Flasheos: number;
Reparaciones: number;
}
2 changes: 1 addition & 1 deletion src/app/pages/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<nav class="navbar navbar-dark bg-dark elevated shake">
<nav class="navbar navbar-dark elevated shake" style="background-color: #01579b;">
<div class="container slideInLeft">
<a class="navbar-brand text-light">ACR Motos {{plataforma}}</a>
<form class="form-inline text-light">
Expand Down
4 changes: 0 additions & 4 deletions src/app/pages/facturar/facturar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ export class FacturarComponent implements OnInit {
let totalCantidadComprasCliente = 0;
let totalComprasActualesCliente = 0;
let totalVentasVendedor = 0;
let totalFlasheosVendedor = 0;
let totalReparacionesVendedor = 0;
const totalFacturas = this.totalFacturas + 1;
const interes = this.tipoPago === 'Efectivo' ? 0 : (this.totalCordoba() * 5) / 100;
let cliente: Cliente;
Expand Down Expand Up @@ -771,8 +769,6 @@ export class FacturarComponent implements OnInit {
.subscribe(usuarios => {
usuario = usuarios.payload.data();
totalVentasVendedor = usuarios.payload.data().Ventas + 1;
totalFlasheosVendedor = usuarios.payload.data().Flasheos;
totalReparacionesVendedor = usuarios.payload.data().Reparaciones;
});
// tslint:disable-next-line:max-line-length
this.fs.doc<HistorialCompra>(`ACR Motos/Control/Clientes/${this.valordebusquedaCliente}/Historial de Compras/${tiempo.getDate()}-${this.meses[tiempo.getMonth()]}-${tiempo.getFullYear()},${tiempo.getHours()}:${tiempo.getMinutes()}:${tiempo.getSeconds()}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<table>
<tr>
<td class="title">
<img src="https://firebasestorage.googleapis.com/v0/b/grupo-ac.appspot.com/o/AC%20Celulares%2FLogotipoACCELULAR.png?alt=media&token=fe837ec4-501f-44ef-8b8a-bd4d41af63f0" style="width:100px;">
<img src="https://firebasestorage.googleapis.com/v0/b/acr-motos.appspot.com/o/Logotipo.png?alt=media&token=fdd841c3-4197-4e37-918c-0d0e86863e5e" style="width:100px;">
</td>

<td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.invoice-box {
max-width: 100%;
padding: 30px;
font-size: 16px;
font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
}

.invoice-box table {
width: 100%;
line-height: inherit;
text-align: left;
}

.invoice-box table td {
vertical-align: top;
}

.invoice-box table tr td:nth-child(2) {
text-align: right;
}

.invoice-box table tr.top table td {
padding-bottom: 20px;
}

.invoice-box table tr.top table td.title {
font-size: 45px;
line-height: 45px;
color: #333;
}

.invoice-box table tr.information table td {
padding-bottom: 40px;
}

.invoice-box table tr.heading td {
border-bottom: 1px solid #ddd;
font-weight: bold;
}

.invoice-box table tr.details td {
padding-bottom: 20px;
}

.invoice-box table tr.item.last td {
border-bottom: none;
}

.invoice-box table tr.total td:nth-child(2) {
font-weight: bold;
}

@media only screen and (max-width: 600px) {
.invoice-box table tr.top table td {
width: 100%;
display: block;
text-align: center;
}

.invoice-box table tr.information table td {
width: 100%;
display: block;
text-align: center;
}
}
/** RTL **/
.rtl {
direction: rtl;
font-family: Tahoma, "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
}

.rtl table {
text-align: right;
}

.rtl table tr td:nth-child(2) {
text-align: left;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<div class="invoice-box">
<table cellpadding="0" cellspacing="0">
<tr class="top">
<td colspan="2">
<table>
<tr>
<td class="title">
<img
src="https://firebasestorage.googleapis.com/v0/b/acr-motos.appspot.com/o/Logotipo.png?alt=media&token=fdd841c3-4197-4e37-918c-0d0e86863e5e"
style="width:100px;">
</td>

<td>
Factura #: {{cantidadFacturas+1}}<br>
Creada: {{ServicioImprimirFactura.Fecha}}
</td>
</tr>
</table>
</td>
</tr>

<tr class="information">
<td colspan="2">
<table>
<tr>
<td>
ACR Motos.<br>
Cruz Roja 20 mts. al Norte<br>
Chichigalpa, Chinandega<br>
acrmotosnic@gmail.com<br>
23468367<br>
RUC #: 0842006960000W
</td>

<td>
Vendedor: {{ServicioImprimirFactura.Vendedor.Nombres}} {{ServicioImprimirFactura.Vendedor.Apellidos}}<br>
Cliente: {{ServicioImprimirFactura.Cliente.NombreCompleto}}<br>
</td>
</tr>
</table>
</td>
</tr>

<tr class="heading">
<td>
Método de Pago
</td>

<td>
Monto
</td>
</tr>

<tr class="details">
<td>
{{ServicioImprimirFactura.TipoPago}}
</td>

<td>
C${{ServicioImprimirFactura.ManoObra - ServicioImprimirFactura.Interes}}
</td>
</tr>

<tr class="heading">
<td>
Extras
</td>

<td>
Monto
</td>
</tr>

<tr class="details">
<td>
Interés
</td>

<td>
C${{ServicioImprimirFactura.Interes}}
</td>
</tr>
</table>
</div>
<table class="table mx-auto" style="max-width: 100%; min-width: 80%;">
<thead>
<tr>
<th>Descripción</th>
<th>Monto</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ServicioImprimirFactura.Servicio.TipoServicio}} - {{ServicioImprimirFactura.Servicio.Nombre}} -
{{ServicioImprimirFactura.MarcaDispositivo}} - {{ServicioImprimirFactura.ModeloDispositivo}}</td>
<td>{{ServicioImprimirFactura.ManoObra}}</td>
</tr>
</tbody>
</table>
<div class="invoice-box mt-5">
<table cellpadding="0" cellspacing="0">
<tr class="information">
<td colspan="2">
<table>
<tr>
<td style="max-width: 50px;">
<hr style="color: black; background-color: black;"><br>
<div class="text-center mt-0">ACR Motos</div>
</td>

<td>
<b>SubTotal: C${{ServicioImprimirFactura.ManoObra}}</b><br>
<b>Extras: C${{ServicioImprimirFactura.Interes}}</b><br>
<b>Total: C${{ServicioImprimirFactura.ManoObra + ServicioImprimirFactura.Interes}}</b>
</td>
</tr>
</table>
</td>
</tr>
</table>
</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>
</div>

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
@@ -0,0 +1,81 @@
.invoice-box {
max-width: 100%;
padding: 30px;
font-size: 16px;
font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
}

.invoice-box table {
width: 100%;
line-height: inherit;
text-align: left;
}

.invoice-box table td {
//padding: 5px;
vertical-align: top;
}

.invoice-box table tr td:nth-child(2) {
text-align: right;
}

.invoice-box table tr.top table td {
padding-bottom: 20px;
}

.invoice-box table tr.top table td.title {
font-size: 45px;
line-height: 45px;
color: #333;
}

.invoice-box table tr.information table td {
padding-bottom: 40px;
}

.invoice-box table tr.heading td {
border-bottom: 1px solid #ddd;
font-weight: bold;
}

.invoice-box table tr.details td {
padding-bottom: 20px;
}

.invoice-box table tr.item.last td {
border-bottom: none;
}

.invoice-box table tr.total td:nth-child(2) {
font-weight: bold;
}

@media only screen and (max-width: 600px) {
.invoice-box table tr.top table td {
width: 100%;
display: block;
text-align: center;
}

.invoice-box table tr.information table td {
width: 100%;
display: block;
text-align: center;
}
}

/** RTL **/
.rtl {
direction: rtl;
font-family: Tahoma, "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
}

.rtl table {
text-align: right;
}

.rtl table tr td:nth-child(2) {
text-align: left;
}

Loading

0 comments on commit 89a9bf5

Please sign in to comment.