Commit 2b2243a6a99495b6719264148bb3141607c48bf0

Authored by Marcelo Puebla
1 parent 77fef3556a
Exists in master and in 1 other branch validar_pve

Creado wrapper y servicios de punto de venta e impresora

src/app/services/impresora.service.spec.ts
File was created 1 import { TestBed } from '@angular/core/testing';
2
3 import { ImpresoraService } from './impresora.service';
4
5 describe('ImpresoraService', () => {
6 beforeEach(() => TestBed.configureTestingModule({}));
7
8 it('should be created', () => {
9 const service: ImpresoraService = TestBed.get(ImpresoraService);
10 expect(service).toBeTruthy();
11 });
12 });
13
src/app/services/impresora.service.ts
File was created 1 import { Injectable } from '@angular/core';
2 import { appSettings } from 'src/etc/AppSettings';
3 import { HttpClient } from '@angular/common/http';
4 import { Observable } from 'rxjs/internal/Observable';
5
6 @Injectable({
7 providedIn: 'root'
8 })
9 export class ImpresoraService {
10
11 private apiAutoservicio = appSettings.apiUrl;
12
13 constructor(
14 private http: HttpClient,
15 ) { }
16
17 getAll(): Observable<any> {
18
19 return this.http.get(`${this.apiAutoservicio}/get/impresoras`);
20 }
21
22 }
23
src/app/services/punto-venta.service.spec.ts
File was created 1 import { TestBed } from '@angular/core/testing';
2
3 import { PuntoVentaService } from './punto-venta.service';
4
5 describe('PuntoVentaService', () => {
6 beforeEach(() => TestBed.configureTestingModule({}));
7
8 it('should be created', () => {
9 const service: PuntoVentaService = TestBed.get(PuntoVentaService);
10 expect(service).toBeTruthy();
11 });
12 });
13
src/app/services/punto-venta.service.ts
File was created 1 import { Injectable } from '@angular/core';
2 import { Observable } from 'rxjs/internal/Observable';
3 import { appSettings } from 'src/etc/AppSettings';
4 import { HttpClient } from '@angular/common/http';
5
6 @Injectable({
7 providedIn: 'root'
8 })
9 export class PuntoVentaService {
10
11 private apiAutoservico = appSettings.apiUrl;
12
13 constructor(
14 private http: HttpClient
15 ) { }
16
17 getAll(): Observable<any> {
18
19 return this.http.get(`${this.apiAutoservico}/get/puntos-venta`);
20 }
21
22 getByID(id: number): Observable<any> {
23
24 return this.http.get(`${this.apiAutoservico}/get/punto-venta/${id}`);
25 }
26
27 getVendedor(filter: any = {}): Observable<any> {
28
29 return this.http.get(`${this.apiAutoservico}/get/vendedor/${JSON.stringify(filter)}`);
30 }
31
32 }
33
src/app/wrappers/impresora.ts
File was created 1 export interface Impresora {
2 PVE: number;
3 TIP: string;
4 MAR: string;
5 DES: string;
6 IMP: string;
7 PVM: number;
8 COM: string;
9 LPT: string;
10 LRE: string;
11 CAJ: boolean;
12 NUI: string;
13 EFA: boolean;
14 NCA: number;
15 OPE: number;
16 EJE: number;
17 IDF: number;
18 POS: number;
19 UCZ: Date;
20 MIH: number;
21 EPS: boolean;
22 BAU: number;
23 RSP: string;
24 ERR: string;
25 HAC: boolean;
26 CAI: string;
27 FCAI: Date;
28 PNFF: boolean;
29 PVERS: boolean;
30 NOIMPCYNC: boolean;
31 H23L_CC: number;
32 SINCRO: boolean;
33 COM_CTRLM: number;
34 TCAE: boolean;
35 USA_FT_NC: boolean;
36 RNFH: boolean;
37 NDF: boolean;
38 MAX_ITEM: string;
39 CTRL_NUM: boolean;
40 MULTI_PV: boolean;
41 MOD_SLIP: boolean;
42 NCC_FISCAL: boolean;
43 CT_FISCAL: boolean;
44 CPI: number;
45 E_HD: string;
46 C_HD: string;
47 ITEM_EXT_PR4: boolean;
48 BMAIL: boolean;
49 RE_PDF_ELEC: boolean;
50 LX300_DIR3: number;
51 TIP_AP_CAJ: number;
52 RNREU: boolean;
53 PUERTO: number;
54 IP: string;
55 AUTORIZA_CAE_MANUAL: boolean;
56 MUE_FEV_IMP: boolean;
57 FAC_LX300: boolean;
58 IMAGEN_FE_A: string;
59 IMAGEN_FE_B: string;
60 CanItemRem: number;
61 TCAEA: boolean;
62 CaCoRe: number;
63 RCUYT: boolean;
64 CanItemFE: string;
65 ImprimeElecTermica: boolean;
66 }
67
src/app/wrappers/puntoVenta.ts
File was created 1 export interface PuntoVenta {
2 ID: number;
3 NOM: string;
4 DES: string;
5 LUG: string;
6 EST: string;
7 MAR: string;
8 NSE: string;
9 MOD: string;
10 MEM: number;
11 OBS: string;
12 PVE: number;
13 EJE: number;
14 OPE: number;
15 IDC: boolean;
16 TER_TOUCH: boolean;
17 ARQ_PENDIENTE: boolean;
18 FAT: boolean;
19 COM_VISOR: number;
20 TIPO_VISOR: number;
21 DireccionNavegador: string;
22 ES_FE: boolean;
23 LECTORHUELLA_TER: boolean;
24 MK_TIPOTRX: string;
25 INTERFAZ_TC: number;
26 PUERTO_PRISMA: string;
27 PVOS: boolean;
28 RutaExp: string;
29 ImpRenParc: boolean;
30 PUERTO_POSNET: string;
31 EXTRACASH: boolean;
32 FIRMA_DIGITAL: boolean;
33 contactless: boolean;
34 MensajeExtraCash: boolean;
35 PLA: number;
36 FON: number;
37 PVE_CI: number;
38 PVE_RE: number;
39 GRP_PLA: number;
40 ImpRecCob: boolean;
41 }
42