@silexpert/core 1.1.318 → 1.1.320

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.
Files changed (122) hide show
  1. package/dist/cjs/api/resources/CalendarEvent.d.ts +2 -1
  2. package/dist/cjs/api/resources/CalendarEvent.d.ts.map +1 -1
  3. package/dist/cjs/api/resources/CalendarEvent.js +3 -0
  4. package/dist/cjs/api/resources/CalendarEvent.js.map +1 -1
  5. package/dist/cjs/api/resources/UserTimeSlot.d.ts +1 -0
  6. package/dist/cjs/api/resources/UserTimeSlot.d.ts.map +1 -1
  7. package/dist/cjs/api/resources/UserTimeSlot.js +3 -0
  8. package/dist/cjs/api/resources/UserTimeSlot.js.map +1 -1
  9. package/dist/cjs/types/Enum/CommercialOfferType.js +7 -7
  10. package/dist/cjs/types/Enum/CommercialOfferType.js.map +1 -1
  11. package/dist/cjs/types/Enum/GeneralThirdParty.d.ts.map +1 -1
  12. package/dist/cjs/types/Enum/GeneralThirdParty.js +2 -0
  13. package/dist/cjs/types/Enum/GeneralThirdParty.js.map +1 -1
  14. package/dist/cjs/types/Enum/MissionAcceptation.d.ts.map +1 -1
  15. package/dist/cjs/types/Enum/MissionAcceptation.js +1 -0
  16. package/dist/cjs/types/Enum/MissionAcceptation.js.map +1 -1
  17. package/dist/cjs/types/Enum/TimeCounterType.d.ts +44 -0
  18. package/dist/cjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  19. package/dist/cjs/types/Enum/TimeCounterType.js +44 -0
  20. package/dist/cjs/types/Enum/TimeCounterType.js.map +1 -1
  21. package/dist/cjs/types/Enum/TimeSlot.d.ts +2 -1
  22. package/dist/cjs/types/Enum/TimeSlot.d.ts.map +1 -1
  23. package/dist/cjs/types/Enum/TimeSlot.js +10 -0
  24. package/dist/cjs/types/Enum/TimeSlot.js.map +1 -1
  25. package/dist/cjs/types/Interface/api/accountingEntry/Create.d.ts +2 -1
  26. package/dist/cjs/types/Interface/api/accountingEntry/Create.d.ts.map +1 -1
  27. package/dist/cjs/types/Interface/api/accountingEntry/Create.js +8 -1
  28. package/dist/cjs/types/Interface/api/accountingEntry/Create.js.map +1 -1
  29. package/dist/cjs/types/Interface/api/calendarEvent/countCalendarEvent.d.ts +7 -0
  30. package/dist/cjs/types/Interface/api/calendarEvent/countCalendarEvent.d.ts.map +1 -0
  31. package/dist/cjs/types/Interface/api/calendarEvent/countCalendarEvent.js +38 -0
  32. package/dist/cjs/types/Interface/api/calendarEvent/countCalendarEvent.js.map +1 -0
  33. package/dist/cjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.d.ts +0 -4
  34. package/dist/cjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.d.ts.map +1 -1
  35. package/dist/cjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.js +1 -18
  36. package/dist/cjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.js.map +1 -1
  37. package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts +12 -11
  38. package/dist/cjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
  39. package/dist/cjs/types/Interface/api/registration/CreateRegistration.js +4 -0
  40. package/dist/cjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  41. package/dist/cjs/types/Interface/api/revision/Read.d.ts +2 -1
  42. package/dist/cjs/types/Interface/api/revision/Read.d.ts.map +1 -1
  43. package/dist/cjs/types/Interface/api/revision/Read.js.map +1 -1
  44. package/dist/cjs/types/Interface/models/IStatistic.d.ts +1 -1
  45. package/dist/cjs/types/Interface/models/IStatistic.d.ts.map +1 -1
  46. package/dist/cjs/types/Interface/models/IStatistic.js.map +1 -1
  47. package/dist/cjs/types/index.d.ts +1 -0
  48. package/dist/cjs/types/index.d.ts.map +1 -1
  49. package/dist/cjs/types/index.js +1 -0
  50. package/dist/cjs/types/index.js.map +1 -1
  51. package/dist/cjs/utils/payment.d.ts.map +1 -1
  52. package/dist/cjs/utils/payment.js +11 -7
  53. package/dist/cjs/utils/payment.js.map +1 -1
  54. package/dist/mjs/api/resources/CalendarEvent.d.ts +2 -1
  55. package/dist/mjs/api/resources/CalendarEvent.d.ts.map +1 -1
  56. package/dist/mjs/api/resources/CalendarEvent.js +4 -0
  57. package/dist/mjs/api/resources/CalendarEvent.js.map +1 -1
  58. package/dist/mjs/api/resources/UserTimeSlot.d.ts +1 -0
  59. package/dist/mjs/api/resources/UserTimeSlot.d.ts.map +1 -1
  60. package/dist/mjs/api/resources/UserTimeSlot.js +5 -0
  61. package/dist/mjs/api/resources/UserTimeSlot.js.map +1 -1
  62. package/dist/mjs/types/Enum/CommercialOfferType.js +7 -7
  63. package/dist/mjs/types/Enum/CommercialOfferType.js.map +1 -1
  64. package/dist/mjs/types/Enum/GeneralThirdParty.d.ts.map +1 -1
  65. package/dist/mjs/types/Enum/GeneralThirdParty.js +2 -0
  66. package/dist/mjs/types/Enum/GeneralThirdParty.js.map +1 -1
  67. package/dist/mjs/types/Enum/MissionAcceptation.d.ts.map +1 -1
  68. package/dist/mjs/types/Enum/MissionAcceptation.js +1 -0
  69. package/dist/mjs/types/Enum/MissionAcceptation.js.map +1 -1
  70. package/dist/mjs/types/Enum/TimeCounterType.d.ts +44 -0
  71. package/dist/mjs/types/Enum/TimeCounterType.d.ts.map +1 -1
  72. package/dist/mjs/types/Enum/TimeCounterType.js +44 -0
  73. package/dist/mjs/types/Enum/TimeCounterType.js.map +1 -1
  74. package/dist/mjs/types/Enum/TimeSlot.d.ts +2 -1
  75. package/dist/mjs/types/Enum/TimeSlot.d.ts.map +1 -1
  76. package/dist/mjs/types/Enum/TimeSlot.js +10 -0
  77. package/dist/mjs/types/Enum/TimeSlot.js.map +1 -1
  78. package/dist/mjs/types/Interface/api/accountingEntry/Create.d.ts +2 -1
  79. package/dist/mjs/types/Interface/api/accountingEntry/Create.d.ts.map +1 -1
  80. package/dist/mjs/types/Interface/api/accountingEntry/Create.js +9 -1
  81. package/dist/mjs/types/Interface/api/accountingEntry/Create.js.map +1 -1
  82. package/dist/mjs/types/Interface/api/calendarEvent/countCalendarEvent.d.ts +7 -0
  83. package/dist/mjs/types/Interface/api/calendarEvent/countCalendarEvent.d.ts.map +1 -0
  84. package/dist/mjs/types/Interface/api/calendarEvent/countCalendarEvent.js +38 -0
  85. package/dist/mjs/types/Interface/api/calendarEvent/countCalendarEvent.js.map +1 -0
  86. package/dist/mjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.d.ts +0 -4
  87. package/dist/mjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.d.ts.map +1 -1
  88. package/dist/mjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.js +1 -19
  89. package/dist/mjs/types/Interface/api/payment/CreateNotifyCustomerInvoice.js.map +1 -1
  90. package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts +12 -11
  91. package/dist/mjs/types/Interface/api/registration/CreateRegistration.d.ts.map +1 -1
  92. package/dist/mjs/types/Interface/api/registration/CreateRegistration.js +5 -0
  93. package/dist/mjs/types/Interface/api/registration/CreateRegistration.js.map +1 -1
  94. package/dist/mjs/types/Interface/api/revision/Read.d.ts +2 -1
  95. package/dist/mjs/types/Interface/api/revision/Read.d.ts.map +1 -1
  96. package/dist/mjs/types/Interface/api/revision/Read.js.map +1 -1
  97. package/dist/mjs/types/Interface/models/IStatistic.d.ts +1 -1
  98. package/dist/mjs/types/Interface/models/IStatistic.d.ts.map +1 -1
  99. package/dist/mjs/types/Interface/models/IStatistic.js.map +1 -1
  100. package/dist/mjs/types/index.d.ts +1 -0
  101. package/dist/mjs/types/index.d.ts.map +1 -1
  102. package/dist/mjs/types/index.js +1 -0
  103. package/dist/mjs/types/index.js.map +1 -1
  104. package/dist/mjs/utils/payment.d.ts.map +1 -1
  105. package/dist/mjs/utils/payment.js +11 -7
  106. package/dist/mjs/utils/payment.js.map +1 -1
  107. package/package.json +1 -1
  108. package/ts/api/resources/CalendarEvent.ts +6 -0
  109. package/ts/api/resources/UserTimeSlot.ts +6 -0
  110. package/ts/types/Enum/CommercialOfferType.ts +7 -7
  111. package/ts/types/Enum/GeneralThirdParty.ts +2 -0
  112. package/ts/types/Enum/MissionAcceptation.ts +1 -0
  113. package/ts/types/Enum/TimeCounterType.ts +44 -0
  114. package/ts/types/Enum/TimeSlot.ts +10 -0
  115. package/ts/types/Interface/api/accountingEntry/Create.ts +8 -2
  116. package/ts/types/Interface/api/calendarEvent/countCalendarEvent.ts +20 -0
  117. package/ts/types/Interface/api/payment/CreateNotifyCustomerInvoice.ts +1 -15
  118. package/ts/types/Interface/api/registration/CreateRegistration.ts +14 -11
  119. package/ts/types/Interface/api/revision/Read.ts +2 -0
  120. package/ts/types/Interface/models/IStatistic.ts +1 -1
  121. package/ts/types/index.ts +1 -0
  122. package/ts/utils/payment.ts +12 -7
@@ -24,37 +24,40 @@ export class CreateRegistrationSettingFromSociety {
24
24
  rof: Rof | null;
25
25
 
26
26
  @ApiPropertyOptional()
27
- companyTaxRof: Rof | null;
27
+ companyTaxRof?: Rof | null;
28
28
 
29
29
  @ApiPropertyOptional()
30
- ogaName: string | null;
30
+ balanceSheetRof?: Rof | null;
31
31
 
32
32
  @ApiPropertyOptional()
33
- ogaId: string | null;
33
+ ogaName?: string | null;
34
34
 
35
35
  @ApiPropertyOptional()
36
- ogaAddressNumero: string | null;
36
+ ogaId?: string | null;
37
37
 
38
38
  @ApiPropertyOptional()
39
- ogaAddressType: string | null;
39
+ ogaAddressNumero?: string | null;
40
40
 
41
41
  @ApiPropertyOptional()
42
- ogaAddressVoie: string | null;
42
+ ogaAddressType?: string | null;
43
43
 
44
44
  @ApiPropertyOptional()
45
- ogaAddressZipCode: string | null;
45
+ ogaAddressVoie?: string | null;
46
46
 
47
47
  @ApiPropertyOptional()
48
- ogaAddressCity: string | null;
48
+ ogaAddressZipCode?: string | null;
49
49
 
50
50
  @ApiPropertyOptional()
51
- ogaReference: string | null;
51
+ ogaAddressCity?: string | null;
52
52
 
53
53
  @ApiPropertyOptional()
54
- iban: string | null;
54
+ ogaReference?: string | null;
55
55
 
56
56
  @ApiPropertyOptional()
57
- bic: string | null;
57
+ iban?: string | null;
58
+
59
+ @ApiPropertyOptional()
60
+ bic?: string | null;
58
61
  }
59
62
 
60
63
  export type ForcedValues_2571 = {
@@ -1,4 +1,5 @@
1
1
  import {
2
+ IAccount,
2
3
  IAccountDetail,
3
4
  IAccountingFile, IAccountingJournal, ILettering, IThirdParty, IUser, ThirdPartyType,
4
5
  } from '../../..';
@@ -53,6 +54,7 @@ export interface ReadRevisionAccount {
53
54
  lettering?: ILettering;
54
55
  createdAt: Date;
55
56
  updatedAt: Date;
57
+ account?: IAccount | null; // Est retourné en fonction de l'endpoint appelé
56
58
  accountingTransaction: {
57
59
  id: number;
58
60
  idBankAccount: number,
@@ -2,7 +2,7 @@ import { IUser } from './IUser';
2
2
 
3
3
  export interface IStatistic {
4
4
  id?: number,
5
- idUser: number,
5
+ idUser?: number | null,
6
6
  startDate?: Date,
7
7
  endDate?: Date,
8
8
  type: number,
package/ts/types/index.ts CHANGED
@@ -918,6 +918,7 @@ export * from './Interface/api/bankAccount/Read';
918
918
  export * from './Interface/api/sheetMonthSchedule/QuerySheetMonthSchedule';
919
919
  export * from './Interface/api/calendarEvent/createCalendarEvent';
920
920
  export * from './Interface/api/calendarEvent/createCalendarEventForUsers';
921
+ export * from './Interface/api/calendarEvent/countCalendarEvent';
921
922
  export * from './Interface/api/calendarEvent/verifyCalendarEvent';
922
923
  export * from './Interface/api/calendarEvent/updateCalendarEvent';
923
924
  export * from './Interface/api/calendarEvent/interval';
@@ -91,6 +91,9 @@ const calculateFees = (amount: number, goToClient: Date, paymentDate: Date):numb
91
91
  */
92
92
  const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
93
93
  const { idTypeBrand, goToClient, isWithApplicationFees, firstExerciceNonExpresssEndDate, idPrestation, idLegalForm, prestationList, idVat, yearlyAmountNonExpress, nextYearlyAmountNonExpress, listPartialExercicePrestationExpress, listRegulations, recoveryDate } = params;
94
+
95
+ if (!yearlyAmountNonExpress) throw new Error('Le montant annuel des prestations non express ne peut pas être nul.');
96
+
94
97
  let initializedPaymentDate = dayjs().endOf('month').diff(dayjs(), 'day') < 3/* || dayjs().date() >= 15 */
95
98
  ? dayjs().add(2, 'month').startOf('month').toDate()
96
99
  : dayjs().add(1, 'month').startOf('month').toDate();
@@ -211,13 +214,15 @@ const calculatePaymentsAuto = (params: ParamsForPaymentsAuto):PaymentAuto[] => {
211
214
  // et on applique le taux de tva de la société
212
215
  const amount = index < countExpressMonthlyPayment ? monthlyAmount : remainingAmountByExercicePrestation; //TTC
213
216
 
214
- listPayments.push({
215
- amount: Math.round(100 * amount) / 100,
216
- datePayment: paymentDate,
217
- idPrestation,
218
- idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,
219
- closingDate: exercicePrestation.endDate,
220
- });
217
+ // On évite les paiements de moins d'0,01 € (pour les paymentsExpectations ayant une différence de 1 cents)
218
+ if (amount >= 0.005)
219
+ listPayments.push({
220
+ amount: Math.round(100 * amount) / 100,
221
+ datePayment: paymentDate,
222
+ idPrestation,
223
+ idPaymentMethod: PaymentMethod.DIRECT_DEBIT.id,
224
+ closingDate: exercicePrestation.endDate,
225
+ });
221
226
  remainingAmountByExercicePrestation -= monthlyAmount;
222
227
  paymentDate = dayjs(paymentDate).add(1, 'month').startOf('month').toDate();
223
228
  }