@silexpert/core 1.1.331 → 1.1.332

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 (61) hide show
  1. package/dist/cjs/api/resources/AccountingFiles.d.ts.map +1 -1
  2. package/dist/cjs/api/resources/AccountingFiles.js +3 -0
  3. package/dist/cjs/api/resources/AccountingFiles.js.map +1 -1
  4. package/dist/cjs/api/resources/SalariesFile.d.ts +1 -1
  5. package/dist/cjs/api/resources/SalariesFile.d.ts.map +1 -1
  6. package/dist/cjs/api/resources/SalariesFile.js.map +1 -1
  7. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
  8. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
  9. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +7 -0
  10. package/dist/cjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
  11. package/dist/cjs/types/Interface/api/societyConfig/update.d.ts +1 -0
  12. package/dist/cjs/types/Interface/api/societyConfig/update.d.ts.map +1 -1
  13. package/dist/cjs/types/Interface/api/societyConfig/update.js +7 -0
  14. package/dist/cjs/types/Interface/api/societyConfig/update.js.map +1 -1
  15. package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts +1 -1
  16. package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts.map +1 -1
  17. package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +1 -0
  18. package/dist/cjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
  19. package/dist/cjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.d.ts +18 -0
  20. package/dist/cjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.d.ts.map +1 -1
  21. package/dist/cjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.js +4 -1
  22. package/dist/cjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.js.map +1 -1
  23. package/dist/cjs/types/Interface/models/ISocietyConfig.d.ts +1 -0
  24. package/dist/cjs/types/Interface/models/ISocietyConfig.d.ts.map +1 -1
  25. package/dist/cjs/types/Interface/models/ISocietyConfig.js.map +1 -1
  26. package/dist/cjs/utils/vat/3310/century23.js.map +1 -1
  27. package/dist/mjs/api/resources/AccountingFiles.d.ts.map +1 -1
  28. package/dist/mjs/api/resources/AccountingFiles.js +3 -0
  29. package/dist/mjs/api/resources/AccountingFiles.js.map +1 -1
  30. package/dist/mjs/api/resources/SalariesFile.d.ts +1 -1
  31. package/dist/mjs/api/resources/SalariesFile.d.ts.map +1 -1
  32. package/dist/mjs/api/resources/SalariesFile.js.map +1 -1
  33. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
  34. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
  35. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js +9 -1
  36. package/dist/mjs/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
  37. package/dist/mjs/types/Interface/api/societyConfig/update.d.ts +1 -0
  38. package/dist/mjs/types/Interface/api/societyConfig/update.d.ts.map +1 -1
  39. package/dist/mjs/types/Interface/api/societyConfig/update.js +8 -0
  40. package/dist/mjs/types/Interface/api/societyConfig/update.js.map +1 -1
  41. package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts +1 -1
  42. package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.d.ts.map +1 -1
  43. package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js +1 -0
  44. package/dist/mjs/types/Interface/api/vatDeclaration/QueryVatDeclaration.js.map +1 -1
  45. package/dist/mjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.d.ts +18 -0
  46. package/dist/mjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.d.ts.map +1 -1
  47. package/dist/mjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.js +4 -0
  48. package/dist/mjs/types/Interface/api/vatDeclaration/ReadVatDeclaration.js.map +1 -1
  49. package/dist/mjs/types/Interface/models/ISocietyConfig.d.ts +1 -0
  50. package/dist/mjs/types/Interface/models/ISocietyConfig.d.ts.map +1 -1
  51. package/dist/mjs/types/Interface/models/ISocietyConfig.js.map +1 -1
  52. package/dist/mjs/utils/vat/3310/century23.js.map +1 -1
  53. package/package.json +1 -1
  54. package/ts/api/resources/AccountingFiles.ts +5 -0
  55. package/ts/api/resources/SalariesFile.ts +1 -1
  56. package/ts/types/Interface/api/accountingFiles/queryAccountingFiles.ts +9 -1
  57. package/ts/types/Interface/api/societyConfig/update.ts +5 -0
  58. package/ts/types/Interface/api/vatDeclaration/QueryVatDeclaration.ts +2 -1
  59. package/ts/types/Interface/api/vatDeclaration/ReadVatDeclaration.ts +11 -0
  60. package/ts/types/Interface/models/ISocietyConfig.ts +1 -0
  61. package/ts/utils/vat/3310/century23.ts +1 -1
@@ -15,6 +15,11 @@ export class AccountingFiles extends Resource {
15
15
  sendAccountingFiles.append('emissionDate', params.emissionDate.toString());
16
16
  }
17
17
 
18
+ if (params.withSocketReturn) {
19
+ sendAccountingFiles.append('withSocketReturn', params.withSocketReturn.toString());
20
+ }
21
+
22
+
18
23
  params.files.forEach((file) => {
19
24
  sendAccountingFiles.append('files', file);
20
25
  });
@@ -8,7 +8,7 @@ export class SalariesFile extends Resource {
8
8
  return this.axios.$post('salariesFile', params);
9
9
  }
10
10
 
11
- createForSociety(idSociety: number, params: CreateSalariesFile): Promise<ReadSalariesFile> {
11
+ createForSociety(idSociety: number, params: CreateSalariesFile): Promise<ReadSalariesFile[]> {
12
12
  const formData = new FormData();
13
13
  Object.entries(params).forEach(([key, value]) => {
14
14
  if (value || value === false || value === 0) {
@@ -1,6 +1,7 @@
1
1
  import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
2
2
  import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
3
3
  import {
4
+ IsBoolean,
4
5
  IsInt, IsOptional,
5
6
  } from 'class-validator';
6
7
 
@@ -25,6 +26,12 @@ export class QueryAccountingFiles {
25
26
 
26
27
  @ApiPropertyOptional()
27
28
  emissionDate?: string;
29
+
30
+ @ApiPropertyOptional()
31
+ @IsBoolean()
32
+ @ToBoolean()
33
+ @IsOptional()
34
+ withSocketReturn?: boolean;
28
35
  }
29
36
 
30
37
  export class QueryAccountingFilesV2 extends QueryAccountingFiles {
@@ -33,6 +40,7 @@ export class QueryAccountingFilesV2 extends QueryAccountingFiles {
33
40
 
34
41
  @ApiPropertyOptional()
35
42
  idAccountingTransaction?: number;
43
+
36
44
  }
37
45
 
38
46
  export class CreateAccountingFileFromFile {
@@ -43,4 +51,4 @@ export class CreateAccountingFileFromFile {
43
51
  @ApiPropertyOptional()
44
52
  @IsOptional()
45
53
  emissionDate: Date | null;
46
- }
54
+ }
@@ -15,6 +15,11 @@ export class UpdateSocietyConfig {
15
15
  @IsOptional()
16
16
  noVat?: boolean;
17
17
 
18
+ @ApiPropertyOptional()
19
+ @IsBoolean()
20
+ @ToBoolean()
21
+ @IsOptional()
22
+ onCollection?: boolean;
18
23
 
19
24
  @ApiPropertyOptional()
20
25
  @IsNumber()
@@ -52,7 +52,8 @@ export class QueryVatEntry {
52
52
 
53
53
  @ApiProperty()
54
54
  @IsString()
55
- type: 'collected' | 'deductible';
55
+ @IsOptional()
56
+ type?: 'collected' | 'deductible';
56
57
  }
57
58
 
58
59
  export class QueryCerfa {
@@ -11,4 +11,15 @@ export class ReadVatDeclarationUpdatedEntry {
11
11
  form: FormEntry[];
12
12
  entries: IAccountingEntry[];
13
13
  };
14
+ }
15
+
16
+ export class ReadVatOnCollection {
17
+ amounts: {
18
+ sales: { [k: string]: number };
19
+ purchases: { [k: string]: number };
20
+ };
21
+ rates: {
22
+ sales: { [k: string]: number };
23
+ purchases: { [k: string]: number };
24
+ };
14
25
  }
@@ -12,6 +12,7 @@ export interface ISocietyConfig {
12
12
  acceptCgv: boolean;
13
13
  showWelcomeModal: boolean;
14
14
  modalNews: boolean;
15
+ onCollection?: boolean;
15
16
  typeMicroentreprise?: number | null;
16
17
  showTipSchedule: boolean;
17
18
  defaultBa?: number | null;
@@ -110,8 +110,8 @@ export function getCerfa3310Century23Payload(accountingEntries: IAccountingEntry
110
110
  const immobilizationTax = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries, ['2'])) + (payload?.vatControl?.deducted?.immobilization ?? 0);
111
111
  const otherGoodsAndServices = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => !v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.abs ?? 0);
112
112
  const otherDeductibles = setZeroIfIsNegative(getTaxAmountByAccountNumber(vatEntries.filter((e) => vats.filter((v) => v.isVatImportation).map((v) => v.id).includes(e.idVat)), ['6'])) + (payload?.vatControl?.deducted?.other ?? 0);
113
+
113
114
  const report = (payload.vat?.deductible?.toReport && payload.vat?.deductible?.toReport > 0 ? _round(payload.vat?.deductible?.toReport ?? 0) : payload.previousVatDeclaration?.credit?.toReport ?? 0) + (payload?.vatControl?.deducted?.reported ?? 0);
114
-
115
115
  const coefficient = _round(payload.vat?.deductible?.coefficient ?? 100, 2);
116
116
  const isNil = payload.isNil === true;
117
117
  const isHolidayDeposit = payload.isHolidayDeposit === true;