@silexpert/core 1.1.40 → 1.1.42
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/es/api/resources/FirstStep.d.ts +2 -1
- package/es/api/resources/FirstStep.d.ts.map +1 -1
- package/es/api/resources/FirstStep.js +3 -0
- package/es/api/resources/FirstStep.js.map +1 -1
- package/es/types/Enum/Activity.d.ts +50 -0
- package/es/types/Enum/Activity.d.ts.map +1 -1
- package/es/types/Enum/Activity.js +50 -0
- package/es/types/Enum/Activity.js.map +1 -1
- package/es/types/Enum/BrandClems.d.ts +164 -0
- package/es/types/Enum/BrandClems.d.ts.map +1 -0
- package/es/types/Enum/BrandClems.js +155 -0
- package/es/types/Enum/BrandClems.js.map +1 -0
- package/es/types/Enum/BrandLegalstart.js +3 -3
- package/es/types/Enum/BrandLegalstart.js.map +1 -1
- package/es/types/Enum/BrandPourcentage.js +2 -2
- package/es/types/Enum/BrandPourcentage.js.map +1 -1
- package/es/types/Enum/Country.d.ts +200 -0
- package/es/types/Enum/Country.d.ts.map +1 -1
- package/es/types/Enum/Country.js +393 -0
- package/es/types/Enum/Country.js.map +1 -1
- package/es/types/Enum/PaymentExpectation.d.ts +18 -0
- package/es/types/Enum/PaymentExpectation.d.ts.map +1 -0
- package/es/types/Enum/PaymentExpectation.js +66 -0
- package/es/types/Enum/PaymentExpectation.js.map +1 -0
- package/es/types/Enum/PrestationType.d.ts +4 -1
- package/es/types/Enum/PrestationType.d.ts.map +1 -1
- package/es/types/Enum/PrestationType.js +54 -0
- package/es/types/Enum/PrestationType.js.map +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.d.ts +2 -0
- package/es/types/Interface/api/aspone/ReadInterchange.d.ts.map +1 -1
- package/es/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/es/types/Interface/api/exercice/QueryExercice.d.ts +1 -0
- package/es/types/Interface/api/exercice/QueryExercice.d.ts.map +1 -1
- package/es/types/Interface/api/exercice/QueryExercice.js +7 -0
- package/es/types/Interface/api/exercice/QueryExercice.js.map +1 -1
- package/es/types/Interface/api/firstStep/Create.d.ts +10 -0
- package/es/types/Interface/api/firstStep/Create.d.ts.map +1 -0
- package/es/types/Interface/api/firstStep/Create.js +56 -0
- package/es/types/Interface/api/firstStep/Create.js.map +1 -0
- package/es/types/Interface/api/society/CreateSocietyDetail.d.ts +6 -0
- package/es/types/Interface/api/society/CreateSocietyDetail.d.ts.map +1 -0
- package/es/types/Interface/api/society/CreateSocietyDetail.js +32 -0
- package/es/types/Interface/api/society/CreateSocietyDetail.js.map +1 -0
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts +15 -0
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.d.ts.map +1 -0
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js +71 -0
- package/es/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js.map +1 -0
- package/es/types/Interface/api/statutsGeneration/SendInviteMailParams.d.ts +4 -0
- package/es/types/Interface/api/statutsGeneration/SendInviteMailParams.d.ts.map +1 -0
- package/es/types/Interface/api/statutsGeneration/SendInviteMailParams.js +19 -0
- package/es/types/Interface/api/statutsGeneration/SendInviteMailParams.js.map +1 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExercice.d.ts +5 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExercice.d.ts.map +1 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExercice.js +26 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExercice.js.map +1 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExerciceParams.d.ts +5 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExerciceParams.d.ts.map +1 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExerciceParams.js +26 -0
- package/es/types/Interface/api/statutsGeneration/UpdateExerciceParams.js.map +1 -0
- package/es/types/Interface/models/ISocietyDetail.d.ts +97 -97
- package/es/types/Interface/models/ISocietyDetail.d.ts.map +1 -1
- package/es/types/Interface/models/ISocietyDetail.js.map +1 -1
- package/es/types/index.d.ts +6 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +6 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/amount.d.ts +1 -0
- package/es/utils/amount.d.ts.map +1 -1
- package/es/utils/amount.js +300 -0
- package/es/utils/amount.js.map +1 -1
- package/es/utils/vat/3310/century23.d.ts.map +1 -1
- package/es/utils/vat/3310/century23.js +5 -4
- package/es/utils/vat/3310/century23.js.map +1 -1
- package/es/utils/vat/registration.js +4 -4
- package/es/utils/vat/registration.js.map +1 -1
- package/js/api/resources/FirstStep.js +3 -0
- package/js/api/resources/FirstStep.js.map +1 -1
- package/js/types/Enum/Activity.js +50 -0
- package/js/types/Enum/Activity.js.map +1 -1
- package/js/types/Enum/BrandClems.js +157 -0
- package/js/types/Enum/BrandClems.js.map +1 -0
- package/js/types/Enum/BrandLegalstart.js +3 -3
- package/js/types/Enum/BrandLegalstart.js.map +1 -1
- package/js/types/Enum/BrandPourcentage.js +2 -2
- package/js/types/Enum/BrandPourcentage.js.map +1 -1
- package/js/types/Enum/Country.js +780 -0
- package/js/types/Enum/Country.js.map +1 -1
- package/js/types/Enum/PaymentExpectation.js +60 -0
- package/js/types/Enum/PaymentExpectation.js.map +1 -0
- package/js/types/Enum/PrestationType.js +54 -0
- package/js/types/Enum/PrestationType.js.map +1 -1
- package/js/types/Interface/api/aspone/ReadInterchange.js.map +1 -1
- package/js/types/Interface/api/exercice/QueryExercice.js +1 -0
- package/js/types/Interface/api/exercice/QueryExercice.js.map +1 -1
- package/js/types/Interface/api/firstStep/Create.js +28 -0
- package/js/types/Interface/api/firstStep/Create.js.map +1 -0
- package/js/types/Interface/api/society/CreateSocietyDetail.js +24 -0
- package/js/types/Interface/api/society/CreateSocietyDetail.js.map +1 -0
- package/js/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js +34 -0
- package/js/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.js.map +1 -0
- package/js/types/Interface/api/statutsGeneration/SendInviteMailParams.js +22 -0
- package/js/types/Interface/api/statutsGeneration/SendInviteMailParams.js.map +1 -0
- package/js/types/Interface/api/statutsGeneration/UpdateExercice.js +23 -0
- package/js/types/Interface/api/statutsGeneration/UpdateExercice.js.map +1 -0
- package/js/types/Interface/api/statutsGeneration/UpdateExerciceParams.js +23 -0
- package/js/types/Interface/api/statutsGeneration/UpdateExerciceParams.js.map +1 -0
- package/js/types/Interface/models/ISocietyDetail.js.map +1 -1
- package/js/types/index.js +87 -27
- package/js/types/index.js.map +1 -1
- package/js/utils/amount.js +238 -0
- package/js/utils/amount.js.map +1 -1
- package/js/utils/vat/3310/century23.js +5 -4
- package/js/utils/vat/3310/century23.js.map +1 -1
- package/js/utils/vat/registration.js +4 -4
- package/js/utils/vat/registration.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/FirstStep.ts +5 -1
- package/ts/types/Enum/Activity.ts +52 -1
- package/ts/types/Enum/BrandClems.ts +154 -0
- package/ts/types/Enum/BrandLegalstart.ts +3 -3
- package/ts/types/Enum/BrandPourcentage.ts +2 -2
- package/ts/types/Enum/Country.ts +394 -0
- package/ts/types/Enum/PaymentExpectation.ts +65 -0
- package/ts/types/Enum/PrestationType.ts +54 -0
- package/ts/types/Interface/api/aspone/ReadInterchange.ts +3 -1
- package/ts/types/Interface/api/exercice/QueryExercice.ts +6 -0
- package/ts/types/Interface/api/firstStep/Create.ts +39 -0
- package/ts/types/Interface/api/society/CreateSocietyDetail.ts +19 -0
- package/ts/types/Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams.ts +54 -0
- package/ts/types/Interface/api/statutsGeneration/SendInviteMailParams.ts +10 -0
- package/ts/types/Interface/api/statutsGeneration/UpdateExercice.ts +16 -0
- package/ts/types/Interface/api/statutsGeneration/UpdateExerciceParams.ts +16 -0
- package/ts/types/Interface/models/ISocietyDetail.ts +97 -97
- package/ts/types/index.ts +6 -0
- package/ts/utils/amount.ts +171 -0
- package/ts/utils/vat/3310/century23.ts +6 -4
- package/ts/utils/vat/registration.ts +3 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsDateString, IsOptional,
|
|
3
|
+
} from 'class-validator';
|
|
4
|
+
import { ApiPropertyOptional } from '../../../../utils/decorators';
|
|
5
|
+
|
|
6
|
+
export class UpdateExerciceStatuts {
|
|
7
|
+
@ApiPropertyOptional()
|
|
8
|
+
@IsDateString()
|
|
9
|
+
@IsOptional()
|
|
10
|
+
startDate?: string;
|
|
11
|
+
|
|
12
|
+
@ApiPropertyOptional()
|
|
13
|
+
@IsDateString()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
endDate?: string;
|
|
16
|
+
}
|
|
@@ -5,105 +5,105 @@ import { ISociety } from './ISociety';
|
|
|
5
5
|
// societyDetails
|
|
6
6
|
export interface ISocietyDetail {
|
|
7
7
|
id?: number;
|
|
8
|
-
detailActivity
|
|
9
|
-
historyComments
|
|
10
|
-
isLoans
|
|
11
|
-
loans
|
|
12
|
-
personnalContribution
|
|
13
|
-
nbBanks
|
|
14
|
-
nbBankaccounts
|
|
15
|
-
isCashdesk
|
|
16
|
-
nbTva
|
|
17
|
-
professionnalRent
|
|
18
|
-
isPersoAdress
|
|
19
|
-
vehicle
|
|
20
|
-
interestOtherCompanies
|
|
21
|
-
nbAssociates
|
|
22
|
-
nbEmployees
|
|
23
|
-
hiringPromess
|
|
24
|
-
aNouveaux
|
|
25
|
-
bilanN1
|
|
26
|
-
revisionDate
|
|
27
|
-
dateFirstContact
|
|
28
|
-
userIdFirstContact
|
|
29
|
-
tauxTvaComment
|
|
30
|
-
remarqueComment
|
|
31
|
-
remarqueCommentCab
|
|
32
|
-
acceptation
|
|
33
|
-
userIdAcceptation
|
|
34
|
-
lab
|
|
35
|
-
userIdLab
|
|
36
|
-
previsionCa
|
|
37
|
-
externalMeans
|
|
38
|
-
needTreasury
|
|
39
|
-
judiciaryRecovery
|
|
40
|
-
fiscalControl
|
|
41
|
-
descriptionFormation
|
|
42
|
-
fonctionAndInterlocutors
|
|
43
|
-
managementKnowledge
|
|
44
|
-
otherIncome
|
|
45
|
-
politicalResponsability
|
|
46
|
-
prohibitedBanking
|
|
47
|
-
accreARCEOrARE
|
|
48
|
-
frenchTaxResident
|
|
49
|
-
isIrTaxable
|
|
50
|
-
billingSoftware
|
|
51
|
-
collectionSystem
|
|
52
|
-
flowSheet
|
|
53
|
-
rankFiles
|
|
54
|
-
specificNeeds
|
|
55
|
-
configAccount
|
|
56
|
-
investissement
|
|
57
|
-
workInternationnal
|
|
58
|
-
creationEntreprise
|
|
59
|
-
oldActivite
|
|
60
|
-
indemnite
|
|
61
|
-
findClementine
|
|
62
|
-
validationDate
|
|
63
|
-
idSociety
|
|
64
|
-
idUser
|
|
65
|
-
idFile
|
|
66
|
-
idFileToClient
|
|
67
|
-
idFindClementine
|
|
68
|
-
nbAssociatesInCompany
|
|
69
|
-
hasCommercialLease
|
|
70
|
-
amountBaseBefore
|
|
71
|
-
trainingIsDone
|
|
72
|
-
commercialArea
|
|
73
|
-
commercialRentAmount
|
|
74
|
-
hasTravellingExpenses
|
|
75
|
-
personnalContributionCapital
|
|
76
|
-
personnalContributionCurrentBankAccount
|
|
77
|
-
personnalContributionInKind
|
|
78
|
-
poleEmploiAid
|
|
79
|
-
poleEmploiAidType
|
|
80
|
-
honorLoan
|
|
81
|
-
honorLoanAmount
|
|
82
|
-
financingStartingStock
|
|
83
|
-
financingStartingStockAmount
|
|
84
|
-
yearSocietyCreation
|
|
85
|
-
lastExerciceCA
|
|
86
|
-
borrowingInProgress
|
|
87
|
-
borrowingInProgressAmount
|
|
88
|
-
investissementCTMT
|
|
89
|
-
changeECReason
|
|
90
|
-
isSocietyCreation
|
|
91
|
-
participationsInOtherSociety
|
|
92
|
-
entrepriseProject
|
|
93
|
-
contractorProfil
|
|
94
|
-
notificationForConstitution
|
|
95
|
-
notificationForOtherMissions
|
|
96
|
-
takeKnowledge
|
|
97
|
-
bankSynchronisationState
|
|
98
|
-
platformExplanation
|
|
99
|
-
mobileAppInstallationProposal
|
|
100
|
-
verifiedDocuments
|
|
8
|
+
detailActivity?: string | null;
|
|
9
|
+
historyComments?: string | null;
|
|
10
|
+
isLoans?: string | null;
|
|
11
|
+
loans?: string | null;
|
|
12
|
+
personnalContribution?: string | null;
|
|
13
|
+
nbBanks?: string | null;
|
|
14
|
+
nbBankaccounts?: number | null;
|
|
15
|
+
isCashdesk?: boolean | null;
|
|
16
|
+
nbTva?: number | null;
|
|
17
|
+
professionnalRent?: string | null;
|
|
18
|
+
isPersoAdress?: string | null;
|
|
19
|
+
vehicle?: string | null;
|
|
20
|
+
interestOtherCompanies?: string | null;
|
|
21
|
+
nbAssociates?: number | null;
|
|
22
|
+
nbEmployees?: number | null;
|
|
23
|
+
hiringPromess?: string | null;
|
|
24
|
+
aNouveaux?: boolean | null;
|
|
25
|
+
bilanN1?: boolean | null;
|
|
26
|
+
revisionDate?: Date | null;
|
|
27
|
+
dateFirstContact?: Date | null;
|
|
28
|
+
userIdFirstContact?: number | null;
|
|
29
|
+
tauxTvaComment?: string | null;
|
|
30
|
+
remarqueComment?: string | null;
|
|
31
|
+
remarqueCommentCab?: string | null;
|
|
32
|
+
acceptation?: number | null;
|
|
33
|
+
userIdAcceptation?: number | null;
|
|
34
|
+
lab?: boolean | null;
|
|
35
|
+
userIdLab?: number | null;
|
|
36
|
+
previsionCa?: string | null;
|
|
37
|
+
externalMeans?: string | null;
|
|
38
|
+
needTreasury?: string | null;
|
|
39
|
+
judiciaryRecovery?: string | null;
|
|
40
|
+
fiscalControl?: string | null;
|
|
41
|
+
descriptionFormation?: string | null;
|
|
42
|
+
fonctionAndInterlocutors?: string | null;
|
|
43
|
+
managementKnowledge?: string | null;
|
|
44
|
+
otherIncome?: string | null;
|
|
45
|
+
politicalResponsability?: string | null;
|
|
46
|
+
prohibitedBanking?: string | null;
|
|
47
|
+
accreARCEOrARE?: string | null;
|
|
48
|
+
frenchTaxResident?: string | null;
|
|
49
|
+
isIrTaxable?: string | null;
|
|
50
|
+
billingSoftware?: string | null;
|
|
51
|
+
collectionSystem?: string | null;
|
|
52
|
+
flowSheet?: string | null;
|
|
53
|
+
rankFiles?: string | null;
|
|
54
|
+
specificNeeds?: string | null;
|
|
55
|
+
configAccount?: boolean | null;
|
|
56
|
+
investissement?: string | null;
|
|
57
|
+
workInternationnal?: string | null;
|
|
58
|
+
creationEntreprise?: string | null;
|
|
59
|
+
oldActivite?: string | null;
|
|
60
|
+
indemnite?: string | null;
|
|
61
|
+
findClementine?: string | null;
|
|
62
|
+
validationDate?: Date | null;
|
|
63
|
+
idSociety?: number | null;
|
|
64
|
+
idUser?: number | null;
|
|
65
|
+
idFile?: number | null;
|
|
66
|
+
idFileToClient?: number | null;
|
|
67
|
+
idFindClementine?: number | null;
|
|
68
|
+
nbAssociatesInCompany?: number | null;
|
|
69
|
+
hasCommercialLease?: string | null;
|
|
70
|
+
amountBaseBefore?: number | null;
|
|
71
|
+
trainingIsDone?: boolean;
|
|
72
|
+
commercialArea?: string | null;
|
|
73
|
+
commercialRentAmount?: string | null;
|
|
74
|
+
hasTravellingExpenses?: string | null;
|
|
75
|
+
personnalContributionCapital?: string | null;
|
|
76
|
+
personnalContributionCurrentBankAccount?: string | null;
|
|
77
|
+
personnalContributionInKind?: string | null;
|
|
78
|
+
poleEmploiAid?: string | null;
|
|
79
|
+
poleEmploiAidType?: number | null;
|
|
80
|
+
honorLoan?: string | null;
|
|
81
|
+
honorLoanAmount?: string | null;
|
|
82
|
+
financingStartingStock?: string | null;
|
|
83
|
+
financingStartingStockAmount?: string | null;
|
|
84
|
+
yearSocietyCreation?: string | null;
|
|
85
|
+
lastExerciceCA?: string | null;
|
|
86
|
+
borrowingInProgress?: string | null;
|
|
87
|
+
borrowingInProgressAmount?: string | null;
|
|
88
|
+
investissementCTMT?: string | null;
|
|
89
|
+
changeECReason?: string | null;
|
|
90
|
+
isSocietyCreation?: boolean | null;
|
|
91
|
+
participationsInOtherSociety?: string | null;
|
|
92
|
+
entrepriseProject?: boolean;
|
|
93
|
+
contractorProfil?: boolean;
|
|
94
|
+
notificationForConstitution?: boolean;
|
|
95
|
+
notificationForOtherMissions?: boolean | null;
|
|
96
|
+
takeKnowledge?: boolean;
|
|
97
|
+
bankSynchronisationState?: number | null;
|
|
98
|
+
platformExplanation?:number | null;
|
|
99
|
+
mobileAppInstallationProposal?:number | null;
|
|
100
|
+
verifiedDocuments?: boolean | null;
|
|
101
101
|
createdAt?: Date | null;
|
|
102
102
|
updatedAt?: Date | null;
|
|
103
103
|
|
|
104
104
|
// Associations
|
|
105
|
-
user
|
|
106
|
-
file
|
|
107
|
-
fileToClient
|
|
108
|
-
society
|
|
105
|
+
user?: IUser;
|
|
106
|
+
file?: IFile;
|
|
107
|
+
fileToClient?: IFile;
|
|
108
|
+
society?: ISociety;
|
|
109
109
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -470,6 +470,7 @@ export * from './Enum/EntityType';
|
|
|
470
470
|
export * from './Enum/Compensation';
|
|
471
471
|
export * from './Enum/CashDeskTransactionType';
|
|
472
472
|
export * from './Enum/ThirdParty';
|
|
473
|
+
export * from './Enum/PaymentExpectation';
|
|
473
474
|
|
|
474
475
|
// Interfaces API
|
|
475
476
|
export * from './Interface/api/adjustment/Query';
|
|
@@ -488,6 +489,7 @@ export * from './Interface/api/accountingEntry/CreateManualEntry';
|
|
|
488
489
|
export * from './Interface/api/immobilization/ReadFormattedImmobilization';
|
|
489
490
|
export * from './Interface/api/immobilization/CreateImmobilization';
|
|
490
491
|
export * from './Interface/api/payment/QueryMonthlyPayment';
|
|
492
|
+
export * from './Interface/api/firstStep/Create';
|
|
491
493
|
export * from './Interface/api/registration/QueryRegistration';
|
|
492
494
|
export * from './Interface/api/paymentExpectationCustomer/ReadPaymentExpectationCustomer';
|
|
493
495
|
export * from './Interface/api/paymentExpectationCustomer/QueryPaymentExpectationCustomer';
|
|
@@ -554,6 +556,7 @@ export * from './Interface/api/commercial/QueryFetchDialogDatasInfosOk';
|
|
|
554
556
|
export * from './Interface/api/commercial/QueryMovePrestationsToNextMonth';
|
|
555
557
|
export * from './Interface/api/society/GetDataSociety';
|
|
556
558
|
export * from './Interface/api/society/CreateSociety';
|
|
559
|
+
export * from './Interface/api/society/CreateSocietyDetail';
|
|
557
560
|
export * from './Interface/api/society/UpdateSociety';
|
|
558
561
|
export * from './Interface/api/society/ListUserSociety';
|
|
559
562
|
export * from './Interface/api/society/CreateUserToSocietyWithPermission';
|
|
@@ -592,6 +595,9 @@ export * from './Interface/api/internalInvoicing/GetLastRef';
|
|
|
592
595
|
export * from './Interface/api/exercice/QueryExercice';
|
|
593
596
|
export * from './Interface/api/exercice/CreateExercice';
|
|
594
597
|
export * from './Interface/api/exercice/UpdateExercice';
|
|
598
|
+
export * from './Interface/api/statutsGeneration/UpdateExerciceParams';
|
|
599
|
+
export * from './Interface/api/statutsGeneration/SendInviteMailParams';
|
|
600
|
+
export * from './Interface/api/statutsGeneration/CreateBusinessPartnersAndUsersParams';
|
|
595
601
|
export * from './Interface/api/accountingIncome/ReadAccountingIncome';
|
|
596
602
|
export * from './Interface/api/ocr/OcrTransactions';
|
|
597
603
|
export * from './Interface/api/bankStatement/QueryBankStatement';
|
package/ts/utils/amount.ts
CHANGED
|
@@ -47,4 +47,175 @@ export function integerToFormattedAmountObject(
|
|
|
47
47
|
...result,
|
|
48
48
|
formattedValue: `${result.sign !== MathematicalSign.EQUAL ? `${result.sign} ` : ''}${result.integerValue},${result.centValue}`,
|
|
49
49
|
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Convertit jusqu'à 999 999 999 999 999 (billion) *
|
|
54
|
+
* @param nombre
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
function getUnite(nombre: number):string {
|
|
58
|
+
let unite;
|
|
59
|
+
switch (nombre) {
|
|
60
|
+
// case 0: unite = 'zéro'; break;
|
|
61
|
+
case 1: unite = 'un'; break;
|
|
62
|
+
case 2: unite = 'deux'; break;
|
|
63
|
+
case 3: unite = 'trois'; break;
|
|
64
|
+
case 4: unite = 'quatre'; break;
|
|
65
|
+
case 5: unite = 'cinq'; break;
|
|
66
|
+
case 6: unite = 'six'; break;
|
|
67
|
+
case 7: unite = 'sept'; break;
|
|
68
|
+
case 8: unite = 'huit'; break;
|
|
69
|
+
case 9: unite = 'neuf'; break;
|
|
70
|
+
default: unite = 'zéro'; break;
|
|
71
|
+
}// fin switch
|
|
72
|
+
return unite;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function getDizaine(nombre: number):string {
|
|
76
|
+
let dizaine;
|
|
77
|
+
switch (nombre) {
|
|
78
|
+
// case 10: dizaine = 'dix'; break;
|
|
79
|
+
case 11: dizaine = 'onze'; break;
|
|
80
|
+
case 12: dizaine = 'douze'; break;
|
|
81
|
+
case 13: dizaine = 'treize'; break;
|
|
82
|
+
case 14: dizaine = 'quatorze'; break;
|
|
83
|
+
case 15: dizaine = 'quinze'; break;
|
|
84
|
+
case 16: dizaine = 'seize'; break;
|
|
85
|
+
case 17: dizaine = 'dix-sept'; break;
|
|
86
|
+
case 18: dizaine = 'dix-huit'; break;
|
|
87
|
+
case 19: dizaine = 'dix-neuf'; break;
|
|
88
|
+
case 20: dizaine = 'vingt'; break;
|
|
89
|
+
case 30: dizaine = 'trente'; break;
|
|
90
|
+
case 40: dizaine = 'quarante'; break;
|
|
91
|
+
case 50: dizaine = 'cinquante'; break;
|
|
92
|
+
case 60: dizaine = 'soixante'; break;
|
|
93
|
+
case 70: dizaine = 'soixante-dix'; break;
|
|
94
|
+
case 80: dizaine = 'quatre-vingt'; break;
|
|
95
|
+
case 90: dizaine = 'quatre-vingt-dix'; break;
|
|
96
|
+
default: dizaine = 'dix'; break;
|
|
97
|
+
}// fin switch
|
|
98
|
+
return dizaine;
|
|
99
|
+
}//-----------------------------------------------------------------------
|
|
100
|
+
|
|
101
|
+
export function convertNumberToLetter(nombre: number): string {
|
|
102
|
+
let quotient: number; let reste: number;
|
|
103
|
+
let numberToLetter = '';
|
|
104
|
+
|
|
105
|
+
if (nombre.toString().replace(/ /gi, '').length > 15) return 'dépassement de capacité';
|
|
106
|
+
if (Number.isNaN(nombre.toString().replace(/ /gi, ''))) return 'Nombre non valide';
|
|
107
|
+
|
|
108
|
+
const nb = parseFloat(nombre.toString().replace(/ /gi, ''));
|
|
109
|
+
if (Math.ceil(nb) !== nb) return 'Nombre avec virgule non géré.';
|
|
110
|
+
|
|
111
|
+
const n = nb.toString().length;
|
|
112
|
+
switch (n) {
|
|
113
|
+
// case 1: numberToLetter = getUnite(nb); break;
|
|
114
|
+
case 2: if (nb > 19) {
|
|
115
|
+
quotient = Math.floor(nb / 10);
|
|
116
|
+
reste = nb % 10;
|
|
117
|
+
if (nb < 71 || (nb > 79 && nb < 91)) {
|
|
118
|
+
if (reste === 0) numberToLetter = getDizaine(quotient * 10);
|
|
119
|
+
if (reste === 1) numberToLetter = `${getDizaine(quotient * 10)}-et-${getUnite(reste)}`;
|
|
120
|
+
if (reste > 1) numberToLetter = `${getDizaine(quotient * 10)}-${getUnite(reste)}`;
|
|
121
|
+
} else numberToLetter = `${getDizaine((quotient - 1) * 10)}-${getDizaine(10 + reste)}`;
|
|
122
|
+
} else numberToLetter = getDizaine(nb);
|
|
123
|
+
break;
|
|
124
|
+
case 3: quotient = Math.floor(nb / 100);
|
|
125
|
+
reste = nb % 100;
|
|
126
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'cent';
|
|
127
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'cent '}${convertNumberToLetter(reste)}`;
|
|
128
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${getUnite(quotient)} cents`;
|
|
129
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${getUnite(quotient)} cent ${convertNumberToLetter(reste)}`;
|
|
130
|
+
break;
|
|
131
|
+
case 4: quotient = Math.floor(nb / 1000);
|
|
132
|
+
reste = nb - quotient * 1000;
|
|
133
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'mille';
|
|
134
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'mille '}${convertNumberToLetter(reste)}`;
|
|
135
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} mille`;
|
|
136
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} mille ${convertNumberToLetter(reste)}`;
|
|
137
|
+
break;
|
|
138
|
+
case 5: quotient = Math.floor(nb / 1000);
|
|
139
|
+
reste = nb - quotient * 1000;
|
|
140
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'mille';
|
|
141
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'mille '}${convertNumberToLetter(reste)}`;
|
|
142
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} mille`;
|
|
143
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} mille ${convertNumberToLetter(reste)}`;
|
|
144
|
+
break;
|
|
145
|
+
case 6: quotient = Math.floor(nb / 1000);
|
|
146
|
+
reste = nb - quotient * 1000;
|
|
147
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'mille';
|
|
148
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'mille '}${convertNumberToLetter(reste)}`;
|
|
149
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} mille`;
|
|
150
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} mille ${convertNumberToLetter(reste)}`;
|
|
151
|
+
break;
|
|
152
|
+
case 7: quotient = Math.floor(nb / 1000000);
|
|
153
|
+
reste = nb % 1000000;
|
|
154
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un million';
|
|
155
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un million '}${convertNumberToLetter(reste)}`;
|
|
156
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} millions`;
|
|
157
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} millions ${convertNumberToLetter(reste)}`;
|
|
158
|
+
break;
|
|
159
|
+
case 8: quotient = Math.floor(nb / 1000000);
|
|
160
|
+
reste = nb % 1000000;
|
|
161
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un million';
|
|
162
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un million '}${convertNumberToLetter(reste)}`;
|
|
163
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} millions`;
|
|
164
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} millions ${convertNumberToLetter(reste)}`;
|
|
165
|
+
break;
|
|
166
|
+
case 9: quotient = Math.floor(nb / 1000000);
|
|
167
|
+
reste = nb % 1000000;
|
|
168
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un million';
|
|
169
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un million '}${convertNumberToLetter(reste)}`;
|
|
170
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} millions`;
|
|
171
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} millions ${convertNumberToLetter(reste)}`;
|
|
172
|
+
break;
|
|
173
|
+
case 10: quotient = Math.floor(nb / 1000000000);
|
|
174
|
+
reste = nb - quotient * 1000000000;
|
|
175
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un milliard';
|
|
176
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un milliard '}${convertNumberToLetter(reste)}`;
|
|
177
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} milliards`;
|
|
178
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} milliards ${convertNumberToLetter(reste)}`;
|
|
179
|
+
break;
|
|
180
|
+
case 11: quotient = Math.floor(nb / 1000000000);
|
|
181
|
+
reste = nb - quotient * 1000000000;
|
|
182
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un milliard';
|
|
183
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un milliard '}${convertNumberToLetter(reste)}`;
|
|
184
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} milliards`;
|
|
185
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} milliards ${convertNumberToLetter(reste)}`;
|
|
186
|
+
break;
|
|
187
|
+
case 12: quotient = Math.floor(nb / 1000000000);
|
|
188
|
+
reste = nb - quotient * 1000000000;
|
|
189
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un milliard';
|
|
190
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un milliard '}${convertNumberToLetter(reste)}`;
|
|
191
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} milliards`;
|
|
192
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} milliards ${convertNumberToLetter(reste)}`;
|
|
193
|
+
break;
|
|
194
|
+
case 13: quotient = Math.floor(nb / 1000000000000);
|
|
195
|
+
reste = nb - quotient * 1000000000000;
|
|
196
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un billion';
|
|
197
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un billion '}${convertNumberToLetter(reste)}`;
|
|
198
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} billions`;
|
|
199
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} billions ${convertNumberToLetter(reste)}`;
|
|
200
|
+
break;
|
|
201
|
+
case 14: quotient = Math.floor(nb / 1000000000000);
|
|
202
|
+
reste = nb - quotient * 1000000000000;
|
|
203
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un billion';
|
|
204
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un billion '}${convertNumberToLetter(reste)}`;
|
|
205
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} billions`;
|
|
206
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} billions ${convertNumberToLetter(reste)}`;
|
|
207
|
+
break;
|
|
208
|
+
case 15: quotient = Math.floor(nb / 1000000000000);
|
|
209
|
+
reste = nb - quotient * 1000000000000;
|
|
210
|
+
if (quotient === 1 && reste === 0) numberToLetter = 'un billion';
|
|
211
|
+
if (quotient === 1 && reste !== 0) numberToLetter = `${'un billion '}${convertNumberToLetter(reste)}`;
|
|
212
|
+
if (quotient > 1 && reste === 0) numberToLetter = `${convertNumberToLetter(quotient)} billions`;
|
|
213
|
+
if (quotient > 1 && reste !== 0) numberToLetter = `${convertNumberToLetter(quotient)} billions ${convertNumberToLetter(reste)}`;
|
|
214
|
+
break;
|
|
215
|
+
default: numberToLetter = getUnite(nb); break;
|
|
216
|
+
} // fin switch
|
|
217
|
+
/* respect de l'accord de quatre-vingt */
|
|
218
|
+
if (numberToLetter.substr(numberToLetter.length - 'quatre-vingt'.length, 'quatre-vingt'.length) === 'quatre-vingt') numberToLetter += 's';
|
|
219
|
+
|
|
220
|
+
return numberToLetter;
|
|
50
221
|
}
|
|
@@ -43,7 +43,7 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
43
43
|
if (mxCollected < 0) { mxToSub += Math.abs(mxCollected); }
|
|
44
44
|
if (mxDeducted > 0) { mxToSub += mxDeducted; }
|
|
45
45
|
|
|
46
|
-
// Opérations taxées
|
|
46
|
+
// Opérations taxées -
|
|
47
47
|
const taxedServicesEntries = vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
48
48
|
const servicesAccounts = ['701', '702', '703', '704', '705', '706', '707', '708', '472'];
|
|
49
49
|
const taxedServicesFromFrance = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries, servicesAccounts, 0, true));
|
|
@@ -54,12 +54,14 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
54
54
|
const taxedImportEntries = vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat));
|
|
55
55
|
const taxedImportAccounts = ['6'];
|
|
56
56
|
const taxedImport = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries, taxedImportAccounts, 0, true));
|
|
57
|
-
|
|
57
|
+
|
|
58
|
+
const intracommunityAccounts2 = ['601', '602', '603', '605', '606', '607'];
|
|
59
|
+
const taxedIntracommunityAcquisitions = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true));
|
|
58
60
|
// Opérations non taxées
|
|
59
61
|
const untaxedExportationNotInEurope = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), servicesAccounts, 0, true));
|
|
60
62
|
const untaxedOther = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => frenchVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['7'], 0, true));
|
|
61
63
|
const untaxedImport = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => importationVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), ['6'], 0, true));
|
|
62
|
-
const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)),
|
|
64
|
+
const untaxedIntracomunity = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => intracomVat.includes(ae.idVat) && withoutTaxVat.includes(ae.idVat)), intracommunityAccounts2, 0, true));
|
|
63
65
|
const untaxedIntracommunityDelivery = setZeroIfIsNegative(getAmountByAccountNumber(vatEntries.filter((ae) => withoutTaxVat.includes(ae.idVat) && intracomVat.includes(ae.idVat)), ['701', '707'], 0, true));
|
|
64
66
|
// TVA brute
|
|
65
67
|
const normalRate = setZeroIfIsNegative(getAmountByAccountNumber(taxedServicesEntries.filter((e) => vats.filter((v) => v.value === 20).map((v) => v.id).includes(e.idVat)), servicesAccounts, 0, true)
|
|
@@ -95,7 +97,7 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
|
|
|
95
97
|
const importReducedRate2Dot1Tax = _round(importReducedRate2Dot1 * 0.021);
|
|
96
98
|
const importReducedRate1Dot05 = setZeroIfIsNegative(getAmountByAccountNumber(taxedImportEntries.filter((e) => vats.filter((v) => v.value === 1.05).map((v) => v.id).includes(e.idVat)), taxedImportAccounts, 0, true));
|
|
97
99
|
const importReducedRate1Dot05Tax = _round(importReducedRate1Dot05 * 0.0105);
|
|
98
|
-
const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, intracommunityServiceAccounts));
|
|
100
|
+
const intracommunityTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(intracommunityServiceEntries, [...intracommunityServiceAccounts, ...intracommunityAccounts2]));
|
|
99
101
|
|
|
100
102
|
// TVA Déductible
|
|
101
103
|
const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2']));
|
|
@@ -76,11 +76,11 @@ export function getTicks(registration: ReadRegistration): ReadRegistrationTick[]
|
|
|
76
76
|
|
|
77
77
|
if (isDefined(declaration.payment)) {
|
|
78
78
|
response.push({
|
|
79
|
-
state: declaration.payment.isError ? RegistrationTickState.FAILED : RegistrationTickState.FINISHED,
|
|
80
|
-
title: declaration.payment?.
|
|
79
|
+
state: declaration.payment.isError ? RegistrationTickState.FAILED : declaration.payment.isError === null ? RegistrationTickState.IN_PROGRESS : RegistrationTickState.FINISHED,
|
|
80
|
+
title: declaration.payment?.label ?? '',
|
|
81
81
|
details: [],
|
|
82
82
|
isPayment: true,
|
|
83
|
-
date: null,
|
|
83
|
+
date: declaration.payment.date ?? null,
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
data.push(response);
|