@silexpert/core 0.1.4 → 0.1.6
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/CHANGELOG.md +2 -0
- package/es/api/resources/PaymentExpectationCustomer.d.ts +3 -3
- package/es/api/resources/PaymentExpectationCustomer.d.ts.map +1 -1
- package/es/api/resources/PaymentExpectationCustomer.js +3 -3
- package/es/api/resources/PaymentExpectationCustomer.js.map +1 -1
- package/es/types/Enum/ImmobilizationType.d.ts +399 -0
- package/es/types/Enum/ImmobilizationType.d.ts.map +1 -0
- package/es/types/Enum/ImmobilizationType.js +399 -0
- package/es/types/Enum/ImmobilizationType.js.map +1 -0
- package/es/types/Enum/Vat.d.ts +9 -0
- package/es/types/Enum/Vat.d.ts.map +1 -1
- package/es/types/Enum/Vat.js +18 -9
- package/es/types/Enum/Vat.js.map +1 -1
- package/es/types/Interface/api/accountingEntry/{CreateAccountingEntry.d.ts → AnnotateAccountingTransaction.d.ts} +10 -4
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -0
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +2 -0
- package/es/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -0
- package/es/types/Interface/models/IAccountingEntry.d.ts +4 -1
- package/es/types/Interface/models/IAccountingEntry.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountingEntry.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +4 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +4 -1
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IExercice.d.ts +14 -14
- package/es/types/Interface/models/IExercice.d.ts.map +1 -1
- package/es/types/Interface/models/IExercice.js.map +1 -1
- package/es/types/Interface/models/IImmobilization.d.ts +15 -0
- package/es/types/Interface/models/IImmobilization.d.ts.map +1 -0
- package/es/types/Interface/models/IImmobilization.js +2 -0
- package/es/types/Interface/models/IImmobilization.js.map +1 -0
- package/es/types/index.d.ts +3 -1
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +3 -1
- package/es/types/index.js.map +1 -1
- package/js/api/resources/PaymentExpectationCustomer.js +3 -3
- package/js/api/resources/PaymentExpectationCustomer.js.map +1 -1
- package/js/types/Enum/ImmobilizationType.js +404 -0
- package/js/types/Enum/ImmobilizationType.js.map +1 -0
- package/js/types/Enum/Vat.js +18 -9
- package/js/types/Enum/Vat.js.map +1 -1
- package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +6 -0
- package/js/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -0
- package/js/types/Interface/models/IApiError.js +4 -1
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/{api/accountingEntry/CreateAccountingEntry.js → models/IImmobilization.js} +1 -1
- package/js/types/Interface/{api/accountingEntry/CreateAccountingEntry.js.map → models/IImmobilization.js.map} +1 -1
- package/js/types/index.js +27 -3
- package/js/types/index.js.map +1 -1
- package/package.json +4 -4
- package/ts/api/resources/PaymentExpectationCustomer.ts +3 -3
- package/ts/types/Enum/ImmobilizationType.ts +399 -0
- package/ts/types/Enum/Vat.ts +18 -9
- package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +32 -0
- package/ts/types/Interface/models/IAccountingEntry.ts +4 -1
- package/ts/types/Interface/models/IApiError.ts +4 -1
- package/ts/types/Interface/models/IExercice.ts +14 -14
- package/ts/types/Interface/models/IImmobilization.ts +18 -0
- package/ts/types/index.ts +3 -1
- package/yalc.lock +4 -0
- package/es/types/Interface/api/accountingEntry/CreateAccountingEntry.d.ts.map +0 -1
- package/es/types/Interface/api/accountingEntry/CreateAccountingEntry.js +0 -2
- package/es/types/Interface/api/accountingEntry/CreateAccountingEntry.js.map +0 -1
- package/ts/types/Interface/api/accountingEntry/CreateAccountingEntry.ts +0 -28
package/ts/types/Enum/Vat.ts
CHANGED
|
@@ -4,62 +4,71 @@ export const Vat = {
|
|
|
4
4
|
value: 0,
|
|
5
5
|
name: 'Hors-Taxe',
|
|
6
6
|
collected: 212,
|
|
7
|
-
deductible: 221
|
|
7
|
+
deductible: 221,
|
|
8
|
+
immobilization: 19,
|
|
8
9
|
},
|
|
9
10
|
TX_5_5: {
|
|
10
11
|
id: 2,
|
|
11
12
|
value: 5.5,
|
|
12
13
|
name: 'TVA 5.5%',
|
|
13
14
|
collected: 209,
|
|
14
|
-
deductible: 4
|
|
15
|
+
deductible: 4,
|
|
16
|
+
immobilization: 10,
|
|
15
17
|
},
|
|
16
18
|
TX_10: {
|
|
17
19
|
id: 3,
|
|
18
20
|
value: 10,
|
|
19
21
|
name: 'TVA 10%',
|
|
20
22
|
collected: 210,
|
|
21
|
-
deductible: 5
|
|
23
|
+
deductible: 5,
|
|
24
|
+
immobilization: 11,
|
|
22
25
|
},
|
|
23
26
|
TX_20: {
|
|
24
27
|
id: 4,
|
|
25
28
|
value: 20,
|
|
26
29
|
name: 'TVA 20%',
|
|
27
30
|
collected: 211,
|
|
28
|
-
deductible: 6
|
|
31
|
+
deductible: 6,
|
|
32
|
+
immobilization: 12,
|
|
29
33
|
},
|
|
30
34
|
TX_2_1: {
|
|
31
35
|
id: 6,
|
|
32
36
|
value: 2.1,
|
|
33
37
|
name: 'TVA 2.1%',
|
|
34
38
|
collected: 222,
|
|
35
|
-
deductible: 7
|
|
39
|
+
deductible: 7,
|
|
40
|
+
immobilization: 13,
|
|
36
41
|
},
|
|
37
42
|
TX_8_5: {
|
|
38
43
|
id: 7,
|
|
39
44
|
value: 8.5,
|
|
40
45
|
name: 'TVA 8.5%',
|
|
41
46
|
collected: 345,
|
|
42
|
-
deductible: 8
|
|
47
|
+
deductible: 8,
|
|
48
|
+
immobilization: 15,
|
|
43
49
|
},
|
|
44
50
|
MARGE: {
|
|
45
51
|
id: 8,
|
|
46
52
|
value: 0,
|
|
47
53
|
name: 'Sur Marge',
|
|
48
54
|
collected: 211,
|
|
49
|
-
deductible: 9
|
|
55
|
+
deductible: 9,
|
|
56
|
+
immobilization: null
|
|
50
57
|
},
|
|
51
58
|
INTRACOM: {
|
|
52
59
|
id: 9,
|
|
53
60
|
value: 20,
|
|
54
61
|
name: 'TVA intracom',
|
|
55
62
|
collected: 207,
|
|
56
|
-
deductible: 208
|
|
63
|
+
deductible: 208,
|
|
64
|
+
immobilization: 208
|
|
57
65
|
},
|
|
58
66
|
MANUAL: {
|
|
59
67
|
id: 11,
|
|
60
68
|
value: 0,
|
|
61
69
|
name: 'TVA manuelle',
|
|
62
70
|
collected: 0,
|
|
63
|
-
deductible: 0
|
|
71
|
+
deductible: 0,
|
|
72
|
+
immobilization: null
|
|
64
73
|
},
|
|
65
74
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IAccountingTransaction } from '../../..';
|
|
2
|
+
import { IImmobilization } from '../../models/IImmobilization';
|
|
3
|
+
|
|
4
|
+
export type FormImmobilization = IImmobilization & { isDeposit: boolean }
|
|
5
|
+
|
|
6
|
+
export interface FormEntry {
|
|
7
|
+
vat? : number | {
|
|
8
|
+
idVat: number;
|
|
9
|
+
amount: number;
|
|
10
|
+
}[];
|
|
11
|
+
idAccount?: number;
|
|
12
|
+
idThirdParty?: number;
|
|
13
|
+
amountAllTaxIncludedPurchase?: number;
|
|
14
|
+
designation?: string;
|
|
15
|
+
amountAllTaxIncluded?: number;
|
|
16
|
+
immobilization?: FormImmobilization // pour la création d'une immo
|
|
17
|
+
idImmobilization?: number; //
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Permet d'annoté une transaction bancaire Split, Marge, Intracom, Immo etc...
|
|
21
|
+
export type AnnotateAccountingTransaction = FormEntry[];
|
|
22
|
+
|
|
23
|
+
// Permet d'afficher une transaction bancaire avec les informations de base ainsi que les informations d'annotations
|
|
24
|
+
export interface ReadFormatedAccountingTransaction extends IAccountingTransaction {
|
|
25
|
+
amount: number;
|
|
26
|
+
comment: string | null;
|
|
27
|
+
designation: string | null;
|
|
28
|
+
debit: number;
|
|
29
|
+
credit: number;
|
|
30
|
+
autoAnnotateWithML: boolean;
|
|
31
|
+
entries?: AnnotateAccountingTransaction;
|
|
32
|
+
}
|
|
@@ -3,6 +3,7 @@ import { IAccount } from './IAccount';
|
|
|
3
3
|
import { IThirdParty } from './IThirdParty';
|
|
4
4
|
import { IAccountingTransaction } from './IAccountingTransaction';
|
|
5
5
|
import {IVat} from './IVat';
|
|
6
|
+
import { IImmobilization } from './IImmobilization';
|
|
6
7
|
|
|
7
8
|
// accountingEntries
|
|
8
9
|
export interface IAccountingEntry {
|
|
@@ -19,7 +20,8 @@ export interface IAccountingEntry {
|
|
|
19
20
|
idAccount: number | null;
|
|
20
21
|
idThirdParty: number | null;
|
|
21
22
|
idAccountingTransaction: number;
|
|
22
|
-
idVat?: number;
|
|
23
|
+
idVat?: number | null;
|
|
24
|
+
idImmobilization?: number | null;
|
|
23
25
|
createdAt?: Date | null;
|
|
24
26
|
updatedAt?: Date | null;
|
|
25
27
|
|
|
@@ -30,4 +32,5 @@ export interface IAccountingEntry {
|
|
|
30
32
|
childTva?: IAccountingEntry;
|
|
31
33
|
accountingTransaction?: IAccountingTransaction;
|
|
32
34
|
vat?: IVat;
|
|
35
|
+
immobilization?: IImmobilization;
|
|
33
36
|
}
|
|
@@ -15,7 +15,7 @@ export enum Code {
|
|
|
15
15
|
internalServerError = 'internal_server_error',
|
|
16
16
|
constraintKeyError = 'resource_fk_error',
|
|
17
17
|
|
|
18
|
-
//
|
|
18
|
+
// Annotation Error
|
|
19
19
|
failedCheckBalance = 'failed_check_balance',
|
|
20
20
|
vatIntracomCanOnlyBeSetForDebit = 'vat_intracom_can_only_be_set_for_debit',
|
|
21
21
|
vatMargeCanOnlyBeSetForCredit = 'vat_marge_can_only_be_set_for_credit',
|
|
@@ -29,6 +29,9 @@ export enum Code {
|
|
|
29
29
|
transactionIsAlreadyExported = 'transaction_is_already_exported',
|
|
30
30
|
thirdPartyIsNotFound = 'third_party_is_not_found',
|
|
31
31
|
accountIsNotFound = 'account_is_not_found',
|
|
32
|
+
immobilizationNotSetWithAccountStartTwo= 'immobilization_not_set_with_account_start_two',
|
|
33
|
+
immobilizationCanOnlyBeSetForDebit= 'immobilization_can_only_be_set_for_debit',
|
|
34
|
+
immobilizationCanNotBeSetWithoutAccount= 'immobilization_can_not_be_set_without_account'
|
|
32
35
|
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -15,8 +15,8 @@ import { IExerciceDetail } from './IExerciceDetail';
|
|
|
15
15
|
// exercices
|
|
16
16
|
export interface IExercice {
|
|
17
17
|
id?: number;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
startDate: Date | null;
|
|
19
|
+
endDate: Date | null;
|
|
20
20
|
turnover: string | null;
|
|
21
21
|
invoicePurchase: number | null;
|
|
22
22
|
invoiceSales: number | null;
|
|
@@ -42,16 +42,16 @@ export interface IExercice {
|
|
|
42
42
|
deletedAt?: Date | null;
|
|
43
43
|
|
|
44
44
|
// Associations
|
|
45
|
-
supervision
|
|
46
|
-
checklists
|
|
47
|
-
exerciceCustomerTvas
|
|
48
|
-
exerciceCustomersIsRegimes
|
|
49
|
-
exerciceBalanceSheet
|
|
50
|
-
exerciceAdditionnalBalance
|
|
51
|
-
exerciceApprovals
|
|
52
|
-
prestations
|
|
53
|
-
exercicesToPrestations
|
|
54
|
-
file
|
|
55
|
-
society
|
|
56
|
-
exerciceDetail
|
|
45
|
+
supervision?: ISupervision;
|
|
46
|
+
checklists?: IChecklist[];
|
|
47
|
+
exerciceCustomerTvas?: ICustomerTva[];
|
|
48
|
+
exerciceCustomersIsRegimes?: ICustomerIsRegime[];
|
|
49
|
+
exerciceBalanceSheet?: IBalanceSheet;
|
|
50
|
+
exerciceAdditionnalBalance?: IAdditionalBalance;
|
|
51
|
+
exerciceApprovals?: ISocietyApproval;
|
|
52
|
+
prestations?: IPrestation[];
|
|
53
|
+
exercicesToPrestations?: IExercicePrestation[];
|
|
54
|
+
file?: IFile;
|
|
55
|
+
society?: ISociety;
|
|
56
|
+
exerciceDetail?: IExerciceDetail;
|
|
57
57
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ISociety } from './ISociety';
|
|
2
|
+
|
|
3
|
+
export interface IImmobilization {
|
|
4
|
+
id?: number;
|
|
5
|
+
designation: string;
|
|
6
|
+
quantity: number;
|
|
7
|
+
acquisitionDate: Date;
|
|
8
|
+
duration: number;
|
|
9
|
+
provider: string;
|
|
10
|
+
amountTotalImmobilization? : number;
|
|
11
|
+
idSociety: number;
|
|
12
|
+
createdAt?: Date | null;
|
|
13
|
+
updatedAt?: Date | null;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
//Associations
|
|
17
|
+
society?: ISociety;
|
|
18
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -98,6 +98,7 @@ export * from './Interface/models/IInternalEstimate';
|
|
|
98
98
|
export * from './Interface/models/IIpTmpBlocked';
|
|
99
99
|
export * from './Interface/models/IItemEstimate';
|
|
100
100
|
export * from './Interface/models/IJobCategory';
|
|
101
|
+
export * from './Interface/models/IImmobilization';
|
|
101
102
|
export * from './Interface/models/IJob';
|
|
102
103
|
export * from './Interface/models/IKilometricAllowanceScale';
|
|
103
104
|
export * from './Interface/models/ILabelPaymentWaiting';
|
|
@@ -286,11 +287,12 @@ export * from './Enum/VatRegime';
|
|
|
286
287
|
export * from './Enum/TypeConnector';
|
|
287
288
|
export * from './Enum/Vat';
|
|
288
289
|
export * from './Enum/AccountingJournal';
|
|
290
|
+
export * from './Enum/ImmobilizationType';
|
|
289
291
|
|
|
290
292
|
// Interfaces API
|
|
291
293
|
export * from './Interface/api/businessPartner/ReadBusinessPartner';
|
|
292
294
|
export * from './Interface/api/simulation/CreateSimulation';
|
|
293
|
-
export * from './Interface/api/accountingEntry/
|
|
295
|
+
export * from './Interface/api/accountingEntry/AnnotateAccountingTransaction';
|
|
294
296
|
export * from './Interface/api/paymentExpectationCustomer/ReadPaymentExpectationCustomer';
|
|
295
297
|
export * from './Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer';
|
|
296
298
|
export * from './Interface/api/paymentExpectationCustomer/UpdatePaymentExpectationCustomer';
|
package/yalc.lock
ADDED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAccountingEntry.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/accountingEntry/CreateAccountingEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAG,MAAM,GAAG;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAID,oBAAY,qBAAqB,GAAG,WAAW,EAAE,CAAC;AAGlD,MAAM,WAAW,iCAAkC,SAAQ,sBAAsB;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateAccountingEntry.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/accountingEntry/CreateAccountingEntry.ts"],"names":[],"mappings":"","sourcesContent":["import { IAccountingTransaction } from '../../..';\n\nexport interface FormEntries {\n vat? : number | {\n idVat: number;\n amount: number;\n }[];\n idAccount?: number;\n idThirdParty?: number;\n amountAllTaxIncludedPurchase?: number;\n designation?: string;\n amountAllTaxIncluded?: number\n}\n\n\n\nexport type CreateAccountingEntry = FormEntries[];\n\n\nexport interface ReadFormatedAccountingTransaction extends IAccountingTransaction {\n amount: number;\n comment: string | null;\n designation: string | null;\n debit: number;\n credit: number;\n autoAnnotateWithML: boolean;\n entries?: CreateAccountingEntry;\n}"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IAccountingTransaction } from '../../..';
|
|
2
|
-
|
|
3
|
-
export interface FormEntries {
|
|
4
|
-
vat? : number | {
|
|
5
|
-
idVat: number;
|
|
6
|
-
amount: number;
|
|
7
|
-
}[];
|
|
8
|
-
idAccount?: number;
|
|
9
|
-
idThirdParty?: number;
|
|
10
|
-
amountAllTaxIncludedPurchase?: number;
|
|
11
|
-
designation?: string;
|
|
12
|
-
amountAllTaxIncluded?: number
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export type CreateAccountingEntry = FormEntries[];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export interface ReadFormatedAccountingTransaction extends IAccountingTransaction {
|
|
21
|
-
amount: number;
|
|
22
|
-
comment: string | null;
|
|
23
|
-
designation: string | null;
|
|
24
|
-
debit: number;
|
|
25
|
-
credit: number;
|
|
26
|
-
autoAnnotateWithML: boolean;
|
|
27
|
-
entries?: CreateAccountingEntry;
|
|
28
|
-
}
|