@cbm-common/cbm-types 0.0.333 → 0.0.335
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/add-client/add-client.d.ts +0 -1
- package/lib/components/add-provider/add-provider.d.ts +1 -1
- package/lib/components/array-input/array-input.component.d.ts +3 -0
- package/lib/components/availability-board/availability-board.d.ts +3 -0
- package/lib/components/record-detail-metadata/record-detail-metadata.d.ts +12 -3
- package/lib/components/user-history/components/cash-history/cash-history.component.d.ts +56 -0
- package/lib/components/user-history/components/general-history/general-history.component.d.ts +12 -2
- package/lib/components/user-history/components/tab-item/tab-item.component.d.ts +1 -0
- package/lib/components/user-history/user-history.d.ts +6 -0
- package/lib/domain/models/auth-reactive.domain.model.d.ts +1 -0
- package/lib/domain/models/charges-for-order-vehicle.domain.model.d.ts +172 -18
- package/lib/domain/models/financial-bank.domain.model.d.ts +1 -0
- package/lib/domain/models/warehouse.domain.model.d.ts +4 -0
- package/lib/domain/repositories/charges-for-order-vehicle.domain.repository.d.ts +3 -0
- package/lib/domain/services/cbm-validators.service.d.ts +32 -0
- package/lib/infrastructure/repositories/changes-for-order-vehicle.infrastructure.repository.d.ts +4 -1
- package/lib/infrastructure/services/charges-for-order-vehicle.infrastructure.service.d.ts +3 -0
- package/package.json +1 -1
|
@@ -163,7 +163,6 @@ export declare class CbmAddClientComponent implements OnInit, AfterViewInit {
|
|
|
163
163
|
cellphoneValidator(): ValidatorFn;
|
|
164
164
|
noWhitespaceValidator(): ValidatorFn;
|
|
165
165
|
asyncDocumentNumberValidator(): AsyncValidatorFn;
|
|
166
|
-
validarRucCedula(numero: string): boolean;
|
|
167
166
|
documentNumberValidator(): ValidatorFn;
|
|
168
167
|
emailsValidator(): ValidatorFn;
|
|
169
168
|
makeSubscriptions(): void;
|
|
@@ -121,7 +121,6 @@ export declare class CbmAddProviderComponent {
|
|
|
121
121
|
}, b: {
|
|
122
122
|
_id: string;
|
|
123
123
|
}): boolean;
|
|
124
|
-
validarRucCedula(numero: string): boolean;
|
|
125
124
|
documentNumberValidator(): ValidatorFn;
|
|
126
125
|
asyncDocumentNumberValidator(): AsyncValidatorFn;
|
|
127
126
|
noWhitespaceValidator(): ValidatorFn;
|
|
@@ -139,6 +138,7 @@ export declare class CbmAddProviderComponent {
|
|
|
139
138
|
fetchDataByRuc(): void;
|
|
140
139
|
fetchCountryCodes(): void;
|
|
141
140
|
fetchEconomicActivity(): Promise<void>;
|
|
141
|
+
private setExtractedEconomicActivity;
|
|
142
142
|
fetchCategories(searchTerm?: string): void;
|
|
143
143
|
addEmail(): void;
|
|
144
144
|
onEmailKeyDown(event: KeyboardEvent): void;
|
|
@@ -16,9 +16,12 @@ export declare class ArrayInputComponent implements ControlValueAccessor, AfterV
|
|
|
16
16
|
protected value: import("@angular/core").WritableSignal<string>;
|
|
17
17
|
protected arrayValue: import("@angular/core").WritableSignal<string[]>;
|
|
18
18
|
protected arrayValueError: Map<number, string>;
|
|
19
|
+
protected invalid: import("@angular/core").WritableSignal<boolean>;
|
|
19
20
|
private onChange;
|
|
20
21
|
protected onTouched: () => void;
|
|
21
22
|
ngOnInit(): void;
|
|
23
|
+
onBlur(): void;
|
|
24
|
+
private updateInvalidState;
|
|
22
25
|
ngAfterViewInit(): void;
|
|
23
26
|
writeValue(value: string[]): void;
|
|
24
27
|
registerOnChange(fn: (value: string[]) => void): void;
|
|
@@ -23,6 +23,9 @@ export declare class CbmAvailabilityBoardComponent {
|
|
|
23
23
|
private currentRow;
|
|
24
24
|
private startMouseX;
|
|
25
25
|
private startMouseY;
|
|
26
|
+
private readonly DRAG_THRESHOLD;
|
|
27
|
+
private mouseDown;
|
|
28
|
+
private dragStarted;
|
|
26
29
|
private draggedHtmlElement;
|
|
27
30
|
timelineRange: import("@angular/core").WritableSignal<Date[]>;
|
|
28
31
|
protected timeline: import("@angular/core").WritableSignal<AvailabilityBoardModel.DateRange[]>;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { ChangeDetectorRef, WritableSignal } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, WritableSignal } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
|
3
3
|
import { CbmRecordDetailMetadataModel } from './types';
|
|
4
4
|
export declare class CbmRecordDetailMetadataComponent {
|
|
5
5
|
private readonly router;
|
|
6
6
|
private readonly route;
|
|
7
7
|
private readonly changeDetectorRef;
|
|
8
|
-
|
|
8
|
+
private readonly elementRef;
|
|
9
|
+
constructor(router: Router, route: ActivatedRoute, changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>);
|
|
10
|
+
menuOpen: WritableSignal<boolean>;
|
|
11
|
+
openSubmenuPath: WritableSignal<string | null>;
|
|
12
|
+
toggleMenu(event: MouseEvent): void;
|
|
13
|
+
toggleSubmenu(path: string, event: MouseEvent): void;
|
|
14
|
+
closeMenu(): void;
|
|
15
|
+
onDocumentClick(event: MouseEvent): void;
|
|
16
|
+
onEscapeKey(): void;
|
|
17
|
+
private readonly badgeTokens;
|
|
18
|
+
protected pillClass(color?: string): string;
|
|
9
19
|
metadata: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.metadata | null>;
|
|
10
20
|
additionalMetadata: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.additionalMetadata[] | undefined>;
|
|
11
21
|
options: import("@angular/core").InputSignal<CbmRecordDetailMetadataModel.options[] | undefined>;
|
|
@@ -19,6 +29,5 @@ export declare class CbmRecordDetailMetadataComponent {
|
|
|
19
29
|
executeFunction(option: WritableSignal<CbmRecordDetailMetadataModel.options>): void;
|
|
20
30
|
navigate(routerLink?: string, queryParams?: Params): void;
|
|
21
31
|
spanText: (data: CbmRecordDetailMetadataModel.metadata) => string;
|
|
22
|
-
protected getRoundedCotentClass(): string;
|
|
23
32
|
protected getIconClass(): string;
|
|
24
33
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { DestroyRef, OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { PaginatedListService } from '@cbm-common/data-access';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { CbmHistoryModel } from "../../../../domain/models/history.domain.model";
|
|
6
|
+
import { CbmUserModel } from "../../../../domain/models/user.domain.model";
|
|
7
|
+
import { CbmHistoryDomainRepository } from "../../../../domain/repositories/history.domain.repository";
|
|
8
|
+
import { CbmUserDomainRepository } from "../../../../domain/repositories/user.domain.repository";
|
|
9
|
+
import { CbmAuthReactiveService } from '../../../../domain/services/auth-reactive.domain.service';
|
|
10
|
+
import { CbmNotificationService } from "../../../../domain/services/notification/notification.service";
|
|
11
|
+
import { CbmFilters } from '../../../filters/filters.component';
|
|
12
|
+
import { CbmUserHistory } from '../../types';
|
|
13
|
+
export declare class CashHistoryComponent implements OnInit {
|
|
14
|
+
private destroyRef;
|
|
15
|
+
private historyRepository;
|
|
16
|
+
private notificationService;
|
|
17
|
+
private userRepository;
|
|
18
|
+
private authReactiveService;
|
|
19
|
+
collection_id: import("@angular/core").InputSignal<string | undefined>;
|
|
20
|
+
event_module: import("@angular/core").InputSignal<string | undefined>;
|
|
21
|
+
collection_name: import("@angular/core").InputSignal<string | undefined>;
|
|
22
|
+
translation: import("@angular/core").InputSignal<CbmUserHistory.Translation[] | undefined>;
|
|
23
|
+
paginationSize: import("@angular/core").InputSignal<number>;
|
|
24
|
+
event: import("@angular/core").InputSignal<string | undefined>;
|
|
25
|
+
tab: import("@angular/core").OutputEmitterRef<string>;
|
|
26
|
+
pressJson: import("@angular/core").OutputEmitterRef<CbmHistoryModel.ListResponse.Item>;
|
|
27
|
+
close: import("@angular/core").OutputEmitterRef<void>;
|
|
28
|
+
json: import("@angular/core").WritableSignal<object>;
|
|
29
|
+
isFilterVisible: import("@angular/core").WritableSignal<boolean>;
|
|
30
|
+
subjectToSearchUser$: Subject<string>;
|
|
31
|
+
now: Date;
|
|
32
|
+
formToFilter: FormGroup<{
|
|
33
|
+
fromDate: FormControl<string | null>;
|
|
34
|
+
toDate: FormControl<string | null>;
|
|
35
|
+
user: FormControl<CbmUserModel.NgSelectListResponse.Item | null>;
|
|
36
|
+
}>;
|
|
37
|
+
filterRef: import("@angular/core").Signal<CbmFilters>;
|
|
38
|
+
constructor(destroyRef: DestroyRef, historyRepository: CbmHistoryDomainRepository, notificationService: CbmNotificationService, userRepository: CbmUserDomainRepository, authReactiveService: CbmAuthReactiveService);
|
|
39
|
+
get isSuperUser(): boolean;
|
|
40
|
+
get companyData(): import("../../../../domain/models/auth-reactive.domain.model").CbmAuthReactiveModel.GlobalTokenData.Company | null;
|
|
41
|
+
users$: PaginatedListService<CbmUserModel.NgSelectListResponse, CbmUserModel.NgSelectListParams, CbmUserModel.ListByCompanyResponse.Item[]>;
|
|
42
|
+
history$: PaginatedListService<CbmHistoryModel.ListResponse, CbmHistoryModel.ListParams, CbmHistoryModel.ListResponse.Item[]>;
|
|
43
|
+
history: import("@angular/core").WritableSignal<CbmHistoryModel.ListResponse.Item[]>;
|
|
44
|
+
ngOnInit(): void;
|
|
45
|
+
subObservers(): void;
|
|
46
|
+
fetchUsers(): void;
|
|
47
|
+
get userControl(): FormControl<CbmUserModel.NgSelectListResponse.Item | null>;
|
|
48
|
+
compareWithId(a: {
|
|
49
|
+
_id: string;
|
|
50
|
+
}, b: {
|
|
51
|
+
_id: string;
|
|
52
|
+
}): boolean;
|
|
53
|
+
fetchHistory(rs?: boolean): void;
|
|
54
|
+
translate(response: CbmHistoryModel.ListResponse.Item[], translation: CbmUserHistory.Translation[]): CbmHistoryModel.ListResponse.Item[];
|
|
55
|
+
number(value: any): number;
|
|
56
|
+
}
|
package/lib/components/user-history/components/general-history/general-history.component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DestroyRef, OnInit } from '@angular/core';
|
|
1
|
+
import { DestroyRef, ElementRef, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { PaginatedListService } from '@cbm-common/data-access';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
@@ -16,6 +16,7 @@ export declare class GeneralHistoryComponent implements OnInit {
|
|
|
16
16
|
private notificationService;
|
|
17
17
|
private userRepository;
|
|
18
18
|
private authReactiveService;
|
|
19
|
+
private elementRef;
|
|
19
20
|
collection_id: import("@angular/core").InputSignal<string | undefined>;
|
|
20
21
|
event_module: import("@angular/core").InputSignal<string | undefined>;
|
|
21
22
|
collection_name: import("@angular/core").InputSignal<string | undefined>;
|
|
@@ -27,6 +28,15 @@ export declare class GeneralHistoryComponent implements OnInit {
|
|
|
27
28
|
close: import("@angular/core").OutputEmitterRef<void>;
|
|
28
29
|
json: import("@angular/core").WritableSignal<object>;
|
|
29
30
|
isFilterVisible: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
viewMode: import("@angular/core").WritableSignal<"card" | "list">;
|
|
32
|
+
openActionsRowId: import("@angular/core").WritableSignal<string | null>;
|
|
33
|
+
menuPosition: import("@angular/core").WritableSignal<{
|
|
34
|
+
top: number;
|
|
35
|
+
left: number;
|
|
36
|
+
} | null>;
|
|
37
|
+
toggleRowActions(id: string, event: MouseEvent): void;
|
|
38
|
+
closeRowActions(): void;
|
|
39
|
+
onDocumentClick(event: MouseEvent): void;
|
|
30
40
|
subjectToSearchUser$: Subject<string>;
|
|
31
41
|
now: Date;
|
|
32
42
|
formToFilter: FormGroup<{
|
|
@@ -35,7 +45,7 @@ export declare class GeneralHistoryComponent implements OnInit {
|
|
|
35
45
|
user: FormControl<CbmUserModel.NgSelectListResponse.Item | null>;
|
|
36
46
|
}>;
|
|
37
47
|
filterRef: import("@angular/core").Signal<CbmFilters>;
|
|
38
|
-
constructor(destroyRef: DestroyRef, historyRepository: CbmHistoryDomainRepository, notificationService: CbmNotificationService, userRepository: CbmUserDomainRepository, authReactiveService: CbmAuthReactiveService);
|
|
48
|
+
constructor(destroyRef: DestroyRef, historyRepository: CbmHistoryDomainRepository, notificationService: CbmNotificationService, userRepository: CbmUserDomainRepository, authReactiveService: CbmAuthReactiveService, elementRef: ElementRef<HTMLElement>);
|
|
39
49
|
get isSuperUser(): boolean;
|
|
40
50
|
get companyData(): import("../../../../domain/models/auth-reactive.domain.model").CbmAuthReactiveModel.GlobalTokenData.Company | null;
|
|
41
51
|
users$: PaginatedListService<CbmUserModel.NgSelectListResponse, CbmUserModel.NgSelectListParams, CbmUserModel.ListByCompanyResponse.Item[]>;
|
|
@@ -2,6 +2,7 @@ import { TemplateRef } from '@angular/core';
|
|
|
2
2
|
export declare class TabItemComponent {
|
|
3
3
|
hasPrintReports: import("@angular/core").InputSignal<boolean>;
|
|
4
4
|
hasEmailReports: import("@angular/core").InputSignal<boolean>;
|
|
5
|
+
hasCash: import("@angular/core").InputSignal<boolean>;
|
|
5
6
|
tabName: import("@angular/core").InputSignal<string>;
|
|
6
7
|
templateRef: import("@angular/core").InputSignal<TemplateRef<any>>;
|
|
7
8
|
}
|
|
@@ -4,27 +4,33 @@ import { GeneralHistoryComponent } from './components/general-history/general-hi
|
|
|
4
4
|
import { PrintHistoryComponent } from './components/print-history/print-history.component';
|
|
5
5
|
import { SriHistoryComponent } from './components/sri-history/sri-history.component';
|
|
6
6
|
import { CbmUserHistory } from './types';
|
|
7
|
+
import { CashHistoryComponent } from './components/cash-history/cash-history.component';
|
|
7
8
|
export declare class CbmUserHistoryComponent {
|
|
8
9
|
generalHistoryTabRef: import("@angular/core").Signal<GeneralHistoryComponent | undefined>;
|
|
9
10
|
printHistoryTabRef: import("@angular/core").Signal<PrintHistoryComponent | undefined>;
|
|
10
11
|
emailHistoryTabRef: import("@angular/core").Signal<EmailHistoryComponent | undefined>;
|
|
11
12
|
sriHistoryTabRef: import("@angular/core").Signal<SriHistoryComponent | undefined>;
|
|
13
|
+
cashHistoryTabRef: import("@angular/core").Signal<CashHistoryComponent | undefined>;
|
|
12
14
|
isSriHistory: import("@angular/core").InputSignal<boolean>;
|
|
13
15
|
collection_id: import("@angular/core").InputSignal<string | undefined>;
|
|
14
16
|
event_module: import("@angular/core").InputSignal<string | undefined>;
|
|
15
17
|
event_module_report: import("@angular/core").InputSignal<string | undefined>;
|
|
18
|
+
event_module_cash: import("@angular/core").InputSignal<string | undefined>;
|
|
16
19
|
collection_name: import("@angular/core").InputSignal<string | undefined>;
|
|
17
20
|
collection_name_email: import("@angular/core").InputSignal<string | undefined>;
|
|
18
21
|
collection_name_report: import("@angular/core").InputSignal<string | undefined>;
|
|
22
|
+
collection_name_cash: import("@angular/core").InputSignal<string | undefined>;
|
|
19
23
|
translation: import("@angular/core").InputSignal<CbmUserHistory.Translation[] | undefined>;
|
|
20
24
|
event: import("@angular/core").InputSignal<string | undefined>;
|
|
21
25
|
paginationSize: import("@angular/core").InputSignal<number>;
|
|
22
26
|
hasPrintReport: import("@angular/core").InputSignal<boolean>;
|
|
23
27
|
hasEmailReport: import("@angular/core").InputSignal<boolean>;
|
|
28
|
+
hasCash: import("@angular/core").InputSignal<boolean>;
|
|
24
29
|
pressJson: import("@angular/core").OutputEmitterRef<CbmHistoryModel.ListResponse.Item>;
|
|
25
30
|
close: import("@angular/core").OutputEmitterRef<void>;
|
|
26
31
|
tab: import("@angular/core").OutputEmitterRef<string>;
|
|
27
32
|
fetchHistory: () => void;
|
|
28
33
|
fetchPrintHistory: () => void;
|
|
29
34
|
fetchSriHistory: () => void;
|
|
35
|
+
fetchCashHistory: () => void;
|
|
30
36
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export declare namespace CbmChargesForOrderVehicleModel {
|
|
2
|
+
type TChargesType = 'general' | 'service' | 'outsourcing_service';
|
|
2
3
|
interface ListParams {
|
|
3
4
|
page: number;
|
|
4
5
|
size: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
vehicle_license_plate?: string;
|
|
7
|
+
sequence_order_vehicle?: string;
|
|
8
|
+
sequence?: string;
|
|
9
|
+
collection_origin_id?: string;
|
|
10
|
+
collection_origin_name?: string;
|
|
11
|
+
collection_origin_document_nomenclature_number?: string;
|
|
12
|
+
charges_type?: TChargesType;
|
|
9
13
|
}
|
|
10
14
|
interface ListResponse {
|
|
11
15
|
success: boolean;
|
|
@@ -33,18 +37,110 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
33
37
|
period_year: string;
|
|
34
38
|
document_nomenclature: string;
|
|
35
39
|
document_number: string;
|
|
40
|
+
ind_automatically_added_overnight?: boolean;
|
|
36
41
|
collection_origin_id: string;
|
|
37
42
|
collection_origin_name: string;
|
|
38
|
-
collection_origin_document_nomenclature_number
|
|
43
|
+
collection_origin_document_nomenclature_number?: string;
|
|
39
44
|
event_module_origin: string;
|
|
45
|
+
vehicle_license_plate?: string;
|
|
46
|
+
sequence_order_vehicle?: string;
|
|
47
|
+
client_business_name?: string;
|
|
48
|
+
client_document_number?: string;
|
|
40
49
|
sales_account_id: string;
|
|
41
|
-
sales_account_sequence
|
|
42
|
-
sales_account_created_at
|
|
50
|
+
sales_account_sequence?: string;
|
|
51
|
+
sales_account_created_at?: number;
|
|
52
|
+
ind_accommodation?: boolean;
|
|
43
53
|
enabled: boolean;
|
|
44
54
|
deleted_at: number;
|
|
45
55
|
user_id: string;
|
|
46
56
|
created_user: string;
|
|
47
57
|
created_at: number;
|
|
58
|
+
charges_type?: TChargesType;
|
|
59
|
+
sales_account?: Item.SalesAccount;
|
|
60
|
+
data_origin?: Item.DataOrigin;
|
|
61
|
+
}
|
|
62
|
+
namespace Item {
|
|
63
|
+
interface DataOrigin {
|
|
64
|
+
vehicle_id?: string;
|
|
65
|
+
vehicle_license_plate?: string;
|
|
66
|
+
vehicle_type?: string;
|
|
67
|
+
vehicle_brand?: string;
|
|
68
|
+
vehicle_model?: string;
|
|
69
|
+
vehicle_color?: string;
|
|
70
|
+
vehicle_cylinder?: string;
|
|
71
|
+
vehicle_year?: string;
|
|
72
|
+
vehicle_registry_code?: string;
|
|
73
|
+
vehicle_chassis_number?: string;
|
|
74
|
+
vehicle_engine_number?: string;
|
|
75
|
+
vehicle_country_id?: string;
|
|
76
|
+
vehicle_country_name?: string;
|
|
77
|
+
vehicle_country_code?: string;
|
|
78
|
+
vehicle_country_short_name?: string;
|
|
79
|
+
vehicle_type_id?: string;
|
|
80
|
+
vehicle_type_name?: string;
|
|
81
|
+
vehicle_class?: string;
|
|
82
|
+
vehicle_fuel?: string;
|
|
83
|
+
order_document_nomenclature?: string;
|
|
84
|
+
order_document_number?: string;
|
|
85
|
+
order_document_date?: number;
|
|
86
|
+
}
|
|
87
|
+
interface SalesAccount {
|
|
88
|
+
data_origin?: DataOrigin;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
interface ListDetailParams {
|
|
93
|
+
order_vehicle_id?: string;
|
|
94
|
+
charges_type?: TChargesType;
|
|
95
|
+
}
|
|
96
|
+
interface ListDetailResponse {
|
|
97
|
+
success: boolean;
|
|
98
|
+
data: ListDetailResponse.Item[];
|
|
99
|
+
}
|
|
100
|
+
namespace ListDetailResponse {
|
|
101
|
+
interface Item {
|
|
102
|
+
_id: string;
|
|
103
|
+
company_id: string;
|
|
104
|
+
country_id: string;
|
|
105
|
+
charges_id: string;
|
|
106
|
+
item_id: string;
|
|
107
|
+
item_code: string;
|
|
108
|
+
item_name: string;
|
|
109
|
+
item_barcode: string;
|
|
110
|
+
type: string;
|
|
111
|
+
category_id: string;
|
|
112
|
+
category_name: string;
|
|
113
|
+
price_list_id: string;
|
|
114
|
+
price_list_name: string;
|
|
115
|
+
cost_center_id: string;
|
|
116
|
+
cost_center_code: string;
|
|
117
|
+
cost_center_name: string;
|
|
118
|
+
cost_center_father_code: string;
|
|
119
|
+
cost_center_father_name: string;
|
|
120
|
+
tax_iva_id: string;
|
|
121
|
+
tax_iva_rate: number;
|
|
122
|
+
amount: number;
|
|
123
|
+
price_type_id: string;
|
|
124
|
+
price_type: string;
|
|
125
|
+
price_type_description: string;
|
|
126
|
+
price_base: number;
|
|
127
|
+
total_price: number;
|
|
128
|
+
discount_rate: number;
|
|
129
|
+
unit_discount: number;
|
|
130
|
+
total_discount: number;
|
|
131
|
+
unit_price: number;
|
|
132
|
+
created_user?: string;
|
|
133
|
+
kit_data?: any[];
|
|
134
|
+
created_at: number;
|
|
135
|
+
collection_origin_id: string;
|
|
136
|
+
sales_account_id: string;
|
|
137
|
+
sales_account_sequence?: string;
|
|
138
|
+
sales_account_created_at?: number;
|
|
139
|
+
event_module_origin: string;
|
|
140
|
+
data_origin?: ListResponse.Item.DataOrigin;
|
|
141
|
+
order_vehicle_id: string;
|
|
142
|
+
order_vehicle_name: string;
|
|
143
|
+
order_vehicle_document: string;
|
|
48
144
|
}
|
|
49
145
|
}
|
|
50
146
|
interface SaveBody {
|
|
@@ -61,6 +157,11 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
61
157
|
collection_origin_document_nomenclature_number: string;
|
|
62
158
|
collection_origin_name: string;
|
|
63
159
|
event_module_origin: string;
|
|
160
|
+
default_cost_center_id?: string;
|
|
161
|
+
default_cost_center_code?: string;
|
|
162
|
+
default_cost_center_name?: string;
|
|
163
|
+
default_cost_center_father_code?: string;
|
|
164
|
+
default_cost_center_father_name?: string;
|
|
64
165
|
charges_detail: SaveBody.Detail[];
|
|
65
166
|
}
|
|
66
167
|
namespace SaveBody {
|
|
@@ -71,7 +172,7 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
71
172
|
stock_afected?: number;
|
|
72
173
|
free_amount?: number;
|
|
73
174
|
manage_by?: string;
|
|
74
|
-
outsourcing_service_data?:
|
|
175
|
+
outsourcing_service_data?: Detail.OutsourcingServiceData;
|
|
75
176
|
item_id: string;
|
|
76
177
|
item_code: string;
|
|
77
178
|
item_barcode: string;
|
|
@@ -115,6 +216,20 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
115
216
|
vehicle_order_request_detail_id?: string;
|
|
116
217
|
charges_detail_tax: Tax[];
|
|
117
218
|
}
|
|
219
|
+
namespace Detail {
|
|
220
|
+
interface OutsourcingServiceData {
|
|
221
|
+
outsourcing_service_movements_id: string;
|
|
222
|
+
code_outsourcing_service: string;
|
|
223
|
+
name_outsourcing_service: string;
|
|
224
|
+
date_purchase_receipt: number;
|
|
225
|
+
structured_document_number: string;
|
|
226
|
+
collection_origin_id: string;
|
|
227
|
+
collection_origin_name: string;
|
|
228
|
+
provider_document_number: string;
|
|
229
|
+
provider_business_name: string;
|
|
230
|
+
cost: number;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
118
233
|
interface Tax {
|
|
119
234
|
type: string;
|
|
120
235
|
description: string;
|
|
@@ -146,21 +261,54 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
146
261
|
period_year: string;
|
|
147
262
|
document_nomenclature: string;
|
|
148
263
|
document_number: string;
|
|
264
|
+
ind_automatically_added_overnight?: boolean;
|
|
149
265
|
collection_origin_id: string;
|
|
150
266
|
collection_origin_name: string;
|
|
151
267
|
collection_origin_document_nomenclature_number: string;
|
|
152
268
|
event_module_origin: string;
|
|
269
|
+
vehicle_license_plate?: string;
|
|
270
|
+
sequence_order_vehicle?: string;
|
|
271
|
+
client_business_name?: string;
|
|
272
|
+
client_document_number?: string;
|
|
153
273
|
sales_account_id: string;
|
|
154
274
|
sales_account_sequence: string;
|
|
155
275
|
sales_account_created_at: number;
|
|
276
|
+
ind_accommodation?: boolean;
|
|
156
277
|
enabled: boolean;
|
|
157
278
|
deleted: boolean;
|
|
279
|
+
deleted_at?: number;
|
|
158
280
|
user_id: string;
|
|
159
281
|
created_user: string;
|
|
160
282
|
created_at: number;
|
|
283
|
+
charges_type?: string;
|
|
161
284
|
charges_detail: Data.Detail[];
|
|
285
|
+
data_origin?: Data.DataOrigin;
|
|
162
286
|
}
|
|
163
287
|
namespace Data {
|
|
288
|
+
interface DataOrigin {
|
|
289
|
+
vehicle_id?: string;
|
|
290
|
+
vehicle_license_plate?: string;
|
|
291
|
+
vehicle_type?: string;
|
|
292
|
+
vehicle_brand?: string;
|
|
293
|
+
vehicle_model?: string;
|
|
294
|
+
vehicle_color?: string;
|
|
295
|
+
vehicle_cylinder?: string;
|
|
296
|
+
vehicle_year?: string;
|
|
297
|
+
vehicle_registry_code?: string;
|
|
298
|
+
vehicle_chassis_number?: string;
|
|
299
|
+
vehicle_engine_number?: string;
|
|
300
|
+
vehicle_country_id?: string;
|
|
301
|
+
vehicle_country_name?: string;
|
|
302
|
+
vehicle_country_code?: string;
|
|
303
|
+
vehicle_country_short_name?: string;
|
|
304
|
+
vehicle_type_id?: string;
|
|
305
|
+
vehicle_type_name?: string;
|
|
306
|
+
vehicle_class?: string;
|
|
307
|
+
vehicle_fuel?: string;
|
|
308
|
+
order_document_nomenclature?: string;
|
|
309
|
+
order_document_number?: string;
|
|
310
|
+
order_document_date?: number;
|
|
311
|
+
}
|
|
164
312
|
interface Detail {
|
|
165
313
|
_id: string;
|
|
166
314
|
company_id: string;
|
|
@@ -170,6 +318,7 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
170
318
|
item_code: string;
|
|
171
319
|
item_name: string;
|
|
172
320
|
item_barcode: string;
|
|
321
|
+
type: string;
|
|
173
322
|
category_id: string;
|
|
174
323
|
category_name: string;
|
|
175
324
|
price_list_id: string;
|
|
@@ -181,11 +330,11 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
181
330
|
cost_center_father_name: string;
|
|
182
331
|
tax_iva_id: string;
|
|
183
332
|
tax_iva_rate: number;
|
|
184
|
-
unit_measure_id
|
|
185
|
-
unit_measure_type
|
|
186
|
-
unit_measure_abbreviation
|
|
187
|
-
unit_measure_name
|
|
188
|
-
unit_measure_quantity
|
|
333
|
+
unit_measure_id?: string;
|
|
334
|
+
unit_measure_type?: string;
|
|
335
|
+
unit_measure_abbreviation?: string;
|
|
336
|
+
unit_measure_name?: string;
|
|
337
|
+
unit_measure_quantity?: number;
|
|
189
338
|
amount: number;
|
|
190
339
|
price_type_id: string;
|
|
191
340
|
price_type: string;
|
|
@@ -195,7 +344,9 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
195
344
|
discount_rate: number;
|
|
196
345
|
unit_discount: number;
|
|
197
346
|
total_discount: number;
|
|
347
|
+
unit_price?: number;
|
|
198
348
|
created_user: string;
|
|
349
|
+
kit_data?: any[];
|
|
199
350
|
created_at: number;
|
|
200
351
|
charges_detail_tax: Detail.Tax[];
|
|
201
352
|
}
|
|
@@ -209,6 +360,7 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
209
360
|
item_code: string;
|
|
210
361
|
item_name: string;
|
|
211
362
|
item_barcode: string;
|
|
363
|
+
type?: string;
|
|
212
364
|
category_id: string;
|
|
213
365
|
category_name: string;
|
|
214
366
|
price_list_id: string;
|
|
@@ -220,11 +372,11 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
220
372
|
cost_center_father_name: string;
|
|
221
373
|
tax_iva_id: string;
|
|
222
374
|
tax_iva_rate: number;
|
|
223
|
-
unit_measure_id
|
|
224
|
-
unit_measure_type
|
|
225
|
-
unit_measure_abbreviation
|
|
226
|
-
unit_measure_name
|
|
227
|
-
unit_measure_quantity
|
|
375
|
+
unit_measure_id?: string;
|
|
376
|
+
unit_measure_type?: string;
|
|
377
|
+
unit_measure_abbreviation?: string;
|
|
378
|
+
unit_measure_name?: string;
|
|
379
|
+
unit_measure_quantity?: number;
|
|
228
380
|
amount: number;
|
|
229
381
|
price_type_id: string;
|
|
230
382
|
price_type: string;
|
|
@@ -234,7 +386,9 @@ export declare namespace CbmChargesForOrderVehicleModel {
|
|
|
234
386
|
discount_rate: number;
|
|
235
387
|
unit_discount: number;
|
|
236
388
|
total_discount: number;
|
|
389
|
+
unit_price?: number;
|
|
237
390
|
created_user: string;
|
|
391
|
+
kit_data?: any[];
|
|
238
392
|
created_at: number;
|
|
239
393
|
charges_detail_tax: Tax[];
|
|
240
394
|
}
|
|
@@ -3,6 +3,8 @@ export declare namespace CbmWarehouseModel {
|
|
|
3
3
|
enabled?: boolean;
|
|
4
4
|
name?: string;
|
|
5
5
|
company_branch_id?: string;
|
|
6
|
+
user_id?: string;
|
|
7
|
+
only_user_warehouses?: boolean;
|
|
6
8
|
}
|
|
7
9
|
interface ListResponse {
|
|
8
10
|
success: boolean;
|
|
@@ -28,6 +30,8 @@ export declare namespace CbmWarehouseModel {
|
|
|
28
30
|
deleted?: boolean;
|
|
29
31
|
enabled?: boolean;
|
|
30
32
|
name?: string;
|
|
33
|
+
user_id?: string;
|
|
34
|
+
only_user_warehouses?: boolean;
|
|
31
35
|
}
|
|
32
36
|
interface ListResponsePaginated {
|
|
33
37
|
success: boolean;
|
|
@@ -5,6 +5,9 @@ export declare class CbmChargesForOrderVehicleDomainRepository implements ICbmCh
|
|
|
5
5
|
private readonly service;
|
|
6
6
|
constructor(service: ICbmChargesForOrderVehicleInfrastructureRepository);
|
|
7
7
|
list(params: CbmChargesForOrderVehicleModel.ListParams): Observable<CbmChargesForOrderVehicleModel.ListResponse>;
|
|
8
|
+
listDetail(params: CbmChargesForOrderVehicleModel.ListDetailParams): Observable<CbmChargesForOrderVehicleModel.ListDetailResponse>;
|
|
8
9
|
getOne(id: string): Observable<CbmChargesForOrderVehicleModel.GetOneResponse>;
|
|
9
10
|
save(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
11
|
+
saveServices(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
12
|
+
saveOutsourcingServices(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
10
13
|
}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { AbstractControl, ValidationErrors, ValidatorFn } from "@angular/forms";
|
|
2
|
+
export type TipoContribuyente = 'natural' | 'publica' | 'privada' | 'desconocido';
|
|
3
|
+
export interface RucValidationResult {
|
|
4
|
+
/** true si la estructura (formato) del RUC es correcta */
|
|
5
|
+
valido: boolean;
|
|
6
|
+
ruc: string;
|
|
7
|
+
provincia: string;
|
|
8
|
+
esProvinciaExterior: boolean;
|
|
9
|
+
tipo: TipoContribuyente;
|
|
10
|
+
establecimiento: string;
|
|
11
|
+
esMatriz: boolean;
|
|
12
|
+
motivo?: string;
|
|
13
|
+
}
|
|
2
14
|
export declare class CbmValidators {
|
|
3
15
|
static textFull(control: AbstractControl): ValidationErrors | null;
|
|
4
16
|
static emailArray(control: AbstractControl): ValidationErrors | null;
|
|
@@ -9,4 +21,24 @@ export declare class CbmValidators {
|
|
|
9
21
|
static maxDate(date: Date | {
|
|
10
22
|
dateFn: (control: AbstractControl) => string;
|
|
11
23
|
}): ValidatorFn;
|
|
24
|
+
/** Valida cédula ecuatoriana (10 dígitos) con Módulo 10 */
|
|
25
|
+
static validarCedula(cedula: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Validación puramente estructural de un RUC ecuatoriano (13 dígitos).
|
|
28
|
+
*
|
|
29
|
+
* Alcance: solo valida FORMATO / ESTRUCTURA, no determina si el RUC "existe" o está activo.
|
|
30
|
+
* No se usa dígito verificador como criterio de rechazo para sociedades/entidades públicas,
|
|
31
|
+
* porque el SRI no garantiza que el algoritmo Módulo 11 aplique a todos los RUC vigentes.
|
|
32
|
+
* Para persona natural sí se valida la cédula base con Módulo 10.
|
|
33
|
+
*
|
|
34
|
+
* Reglas:
|
|
35
|
+
* - Longitud: 13 dígitos numéricos.
|
|
36
|
+
* - Provincia (dígitos 1-2): 01-24 o 30 (exterior).
|
|
37
|
+
* - Tipo (dígito 3): 0-5 → persona natural, 6 → pública, 9 → privada, 7/8 → inválido.
|
|
38
|
+
* - Persona natural: los primeros 10 dígitos deben ser cédula válida (Módulo 10),
|
|
39
|
+
* y el establecimiento (últimos 3) no puede ser "000".
|
|
40
|
+
* - Entidad pública: establecimiento (últimos 4) no puede ser "0000".
|
|
41
|
+
* - Sociedad privada: establecimiento (últimos 3) no puede ser "000".
|
|
42
|
+
*/
|
|
43
|
+
static validarRuc(ruc: string): RucValidationResult;
|
|
12
44
|
}
|
package/lib/infrastructure/repositories/changes-for-order-vehicle.infrastructure.repository.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { CbmChargesForOrderVehicleModel } from
|
|
1
|
+
import { CbmChargesForOrderVehicleModel } from '../../domain/models/charges-for-order-vehicle.domain.model';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
export interface ICbmChargesForOrderVehicleInfrastructureRepository {
|
|
4
4
|
list(params: CbmChargesForOrderVehicleModel.ListParams): Observable<CbmChargesForOrderVehicleModel.ListResponse>;
|
|
5
|
+
listDetail(params: CbmChargesForOrderVehicleModel.ListDetailParams): Observable<CbmChargesForOrderVehicleModel.ListDetailResponse>;
|
|
5
6
|
getOne(id: string): Observable<CbmChargesForOrderVehicleModel.GetOneResponse>;
|
|
6
7
|
save(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
8
|
+
saveServices(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
9
|
+
saveOutsourcingServices(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
7
10
|
}
|
|
@@ -7,6 +7,9 @@ export declare class CbmChargesForOrderVehicleInfrastructureService implements I
|
|
|
7
7
|
constructor(http: HttpClient);
|
|
8
8
|
private readonly url;
|
|
9
9
|
list(params: CbmChargesForOrderVehicleModel.ListParams): Observable<CbmChargesForOrderVehicleModel.ListResponse>;
|
|
10
|
+
listDetail(params: CbmChargesForOrderVehicleModel.ListDetailParams): Observable<CbmChargesForOrderVehicleModel.ListDetailResponse>;
|
|
10
11
|
getOne(id: string): Observable<CbmChargesForOrderVehicleModel.GetOneResponse>;
|
|
11
12
|
save(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
13
|
+
saveServices(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
14
|
+
saveOutsourcingServices(data: CbmChargesForOrderVehicleModel.SaveBody): Observable<CbmChargesForOrderVehicleModel.ConfirmResponse>;
|
|
12
15
|
}
|