@silexpert/core 1.0.5 → 1.0.8

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 (137) hide show
  1. package/es/api/resources/AccountingFiles.d.ts +1 -0
  2. package/es/api/resources/AccountingFiles.d.ts.map +1 -1
  3. package/es/api/resources/AccountingFiles.js +3 -0
  4. package/es/api/resources/AccountingFiles.js.map +1 -1
  5. package/es/api/resources/Invoice.d.ts +3 -1
  6. package/es/api/resources/Invoice.d.ts.map +1 -1
  7. package/es/api/resources/Invoice.js +6 -0
  8. package/es/api/resources/Invoice.js.map +1 -1
  9. package/es/api/resources/commercialDocument.d.ts +1 -4
  10. package/es/api/resources/commercialDocument.d.ts.map +1 -1
  11. package/es/api/resources/commercialDocument.js +0 -6
  12. package/es/api/resources/commercialDocument.js.map +1 -1
  13. package/es/types/Enum/CommercialManagement.d.ts +10 -0
  14. package/es/types/Enum/CommercialManagement.d.ts.map +1 -1
  15. package/es/types/Enum/CommercialManagement.js +25 -0
  16. package/es/types/Enum/CommercialManagement.js.map +1 -1
  17. package/es/types/Enum/Vat.js +1 -1
  18. package/es/types/Enum/Vat.js.map +1 -1
  19. package/es/types/Interface/api/commercialManagement/Create.d.ts +2 -0
  20. package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
  21. package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
  22. package/es/types/Interface/api/commercialManagement/Query.d.ts +2 -2
  23. package/es/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
  24. package/es/types/Interface/api/commercialManagement/Query.js +1 -1
  25. package/es/types/Interface/api/commercialManagement/Query.js.map +1 -1
  26. package/es/types/Interface/api/commercialManagement/Read.d.ts +3 -0
  27. package/es/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
  28. package/es/types/Interface/api/commercialManagement/Read.js.map +1 -1
  29. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.d.ts +1 -0
  30. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.d.ts.map +1 -1
  31. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js +7 -1
  32. package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js.map +1 -1
  33. package/es/types/Interface/api/product/CreateProduct.d.ts +2 -1
  34. package/es/types/Interface/api/product/CreateProduct.d.ts.map +1 -1
  35. package/es/types/Interface/api/product/CreateProduct.js +7 -1
  36. package/es/types/Interface/api/product/CreateProduct.js.map +1 -1
  37. package/es/types/Interface/api/thirdParty/QueryThirdParty.d.ts +1 -0
  38. package/es/types/Interface/api/thirdParty/QueryThirdParty.d.ts.map +1 -1
  39. package/es/types/Interface/api/thirdParty/QueryThirdParty.js +7 -1
  40. package/es/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
  41. package/es/types/Interface/models/IAccountingTransaction.d.ts +1 -1
  42. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  43. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  44. package/es/types/Interface/models/IApiError.d.ts +1 -0
  45. package/es/types/Interface/models/IApiError.d.ts.map +1 -1
  46. package/es/types/Interface/models/IApiError.js +1 -0
  47. package/es/types/Interface/models/IApiError.js.map +1 -1
  48. package/es/types/Interface/models/ICommercialMail.d.ts +1 -3
  49. package/es/types/Interface/models/ICommercialMail.d.ts.map +1 -1
  50. package/es/types/Interface/models/ICommercialMail.js.map +1 -1
  51. package/es/types/Interface/models/IEngagementBankTransaction.d.ts +0 -2
  52. package/es/types/Interface/models/IEngagementBankTransaction.d.ts.map +1 -1
  53. package/es/types/Interface/models/IEngagementBankTransaction.js.map +1 -1
  54. package/es/types/Interface/models/IFile.d.ts +2 -0
  55. package/es/types/Interface/models/IFile.d.ts.map +1 -1
  56. package/es/types/Interface/models/IFile.js.map +1 -1
  57. package/es/types/Interface/models/ILoan.d.ts +2 -0
  58. package/es/types/Interface/models/ILoan.d.ts.map +1 -1
  59. package/es/types/Interface/models/ILoan.js.map +1 -1
  60. package/es/types/Interface/models/IPartnerTransaction.d.ts +0 -1
  61. package/es/types/Interface/models/IPartnerTransaction.d.ts.map +1 -1
  62. package/es/types/Interface/models/IPartnerTransaction.js.map +1 -1
  63. package/es/types/Interface/models/IProduct.d.ts +4 -2
  64. package/es/types/Interface/models/IProduct.d.ts.map +1 -1
  65. package/es/types/Interface/models/IProduct.js.map +1 -1
  66. package/es/types/Interface/models/IProductInvoice.d.ts +2 -0
  67. package/es/types/Interface/models/IProductInvoice.d.ts.map +1 -1
  68. package/es/types/Interface/models/IProductInvoice.js.map +1 -1
  69. package/es/utils/commercialManagement/document.d.ts.map +1 -1
  70. package/es/utils/commercialManagement/document.js +12 -8
  71. package/es/utils/commercialManagement/document.js.map +1 -1
  72. package/es/utils/commercialManagement/product.d.ts.map +1 -1
  73. package/es/utils/commercialManagement/product.js +3 -3
  74. package/es/utils/commercialManagement/product.js.map +1 -1
  75. package/es/utils/commercialManagement/templates/body.js +1 -1
  76. package/es/utils/commercialManagement/templates/body.js.map +1 -1
  77. package/es/utils/commercialManagement/templates/common.js +1 -1
  78. package/es/utils/commercialManagement/templates/common.js.map +1 -1
  79. package/es/utils/commercialManagement/vat.d.ts.map +1 -1
  80. package/es/utils/commercialManagement/vat.js +1 -0
  81. package/es/utils/commercialManagement/vat.js.map +1 -1
  82. package/js/api/resources/AccountingFiles.js +4 -0
  83. package/js/api/resources/AccountingFiles.js.map +1 -1
  84. package/js/api/resources/Invoice.js +8 -0
  85. package/js/api/resources/Invoice.js.map +1 -1
  86. package/js/api/resources/commercialDocument.js +0 -8
  87. package/js/api/resources/commercialDocument.js.map +1 -1
  88. package/js/types/Enum/CommercialManagement.js +23 -0
  89. package/js/types/Enum/CommercialManagement.js.map +1 -1
  90. package/js/types/Enum/Vat.js +1 -1
  91. package/js/types/Enum/Vat.js.map +1 -1
  92. package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
  93. package/js/types/Interface/api/commercialManagement/Query.js.map +1 -1
  94. package/js/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js +2 -0
  95. package/js/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js.map +1 -1
  96. package/js/types/Interface/api/product/CreateProduct.js +3 -1
  97. package/js/types/Interface/api/product/CreateProduct.js.map +1 -1
  98. package/js/types/Interface/api/thirdParty/QueryThirdParty.js +2 -0
  99. package/js/types/Interface/api/thirdParty/QueryThirdParty.js.map +1 -1
  100. package/js/types/Interface/models/IApiError.js +1 -0
  101. package/js/types/Interface/models/IApiError.js.map +1 -1
  102. package/js/utils/commercialManagement/document.js +16 -7
  103. package/js/utils/commercialManagement/document.js.map +1 -1
  104. package/js/utils/commercialManagement/product.js +3 -2
  105. package/js/utils/commercialManagement/product.js.map +1 -1
  106. package/js/utils/commercialManagement/templates/body.js +1 -1
  107. package/js/utils/commercialManagement/templates/body.js.map +1 -1
  108. package/js/utils/commercialManagement/templates/common.js +1 -1
  109. package/js/utils/commercialManagement/templates/common.js.map +1 -1
  110. package/js/utils/commercialManagement/vat.js +1 -0
  111. package/js/utils/commercialManagement/vat.js.map +1 -1
  112. package/package.json +1 -1
  113. package/ts/api/resources/AccountingFiles.ts +4 -0
  114. package/ts/api/resources/Invoice.ts +10 -0
  115. package/ts/api/resources/commercialDocument.ts +0 -10
  116. package/ts/types/Enum/CommercialManagement.ts +27 -1
  117. package/ts/types/Enum/Vat.ts +1 -1
  118. package/ts/types/Interface/api/commercialManagement/Create.ts +2 -0
  119. package/ts/types/Interface/api/commercialManagement/Query.ts +2 -2
  120. package/ts/types/Interface/api/commercialManagement/Read.ts +3 -0
  121. package/ts/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.ts +6 -1
  122. package/ts/types/Interface/api/product/CreateProduct.ts +6 -1
  123. package/ts/types/Interface/api/thirdParty/QueryThirdParty.ts +8 -1
  124. package/ts/types/Interface/models/IAccountingTransaction.ts +1 -1
  125. package/ts/types/Interface/models/IApiError.ts +1 -0
  126. package/ts/types/Interface/models/ICommercialMail.ts +1 -5
  127. package/ts/types/Interface/models/IEngagementBankTransaction.ts +0 -2
  128. package/ts/types/Interface/models/IFile.ts +2 -0
  129. package/ts/types/Interface/models/ILoan.ts +2 -0
  130. package/ts/types/Interface/models/IPartnerTransaction.ts +0 -1
  131. package/ts/types/Interface/models/IProduct.ts +4 -2
  132. package/ts/types/Interface/models/IProductInvoice.ts +2 -0
  133. package/ts/utils/commercialManagement/document.ts +10 -4
  134. package/ts/utils/commercialManagement/product.ts +2 -1
  135. package/ts/utils/commercialManagement/templates/body.ts +1 -1
  136. package/ts/utils/commercialManagement/templates/common.ts +1 -1
  137. package/ts/utils/commercialManagement/vat.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CreateProduct.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/product/CreateProduct.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,GACpC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAE7E,MAAM,OAAO,aAAa;CAwCzB;AArCC;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;2CACE;AAMb;IAJC,WAAW,EAAE;IACb,GAAG,CAAC,CAAC,EAAE;QACN,OAAO,EAAE,0BAA0B;KACpC,CAAC;;uDACuB;AAIzB;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;4CACG;AAMd;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;6CACI;AAKjB;IAHC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,CAAC,IAAI,CAAC;;2CACJ;AAKb;IAHC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,CAAC,WAAW,CAAC;;2CACX;AAKb;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;8CACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;kDACQ","sourcesContent":["import {\n IsBoolean,\n IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ProductType, Unit } from '../../..';\nimport { ApiProperty, ApiPropertyOptional } from '../../../..';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { IsObjectId } from '../../../../utils/validators/objectId.validator';\n\nexport class CreateProduct {\n @ApiProperty()\n @IsString()\n name: string;\n\n @ApiProperty()\n @Min(0, {\n message: 'Price should be positive',\n })\n priceTaxExcluded: number;\n\n @ApiProperty()\n @IsNumber()\n idVAT: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isFree?: boolean;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(Unit)\n unit: number;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(ProductType)\n type: number;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n codeProduct?: string;\n}\n"]}
1
+ {"version":3,"file":"CreateProduct.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/product/CreateProduct.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,GACpC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAE7E,MAAM,OAAO,aAAa;CA6CzB;AA1CC;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;2CACE;AAMb;IAJC,WAAW,EAAE;IACb,GAAG,CAAC,CAAC,EAAE;QACN,OAAO,EAAE,0BAA0B;KACpC,CAAC;;uDACuB;AAIzB;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;4CACG;AAKd;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;oDACU;AAMvB;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;6CACI;AAKjB;IAHC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,CAAC,IAAI,CAAC;;2CACJ;AAKb;IAHC,WAAW,EAAE;IACb,QAAQ,EAAE;IACV,UAAU,CAAC,WAAW,CAAC;;2CACX;AAKb;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;8CACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;kDACQ","sourcesContent":["import {\n IsBoolean,\n IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ProductType, Unit } from '../../..';\nimport { ApiProperty, ApiPropertyOptional } from '../../../..';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { IsObjectId } from '../../../../utils/validators/objectId.validator';\n\nexport class CreateProduct {\n @ApiProperty()\n @IsString()\n name: string;\n\n @ApiProperty()\n @Min(0, {\n message: 'Price should be positive',\n })\n priceTaxExcluded: number;\n\n @ApiProperty()\n @IsNumber()\n idVat: number;\n\n @ApiPropertyOptional()\n @IsNumber()\n @IsOptional()\n marginVatType?: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isFree?: boolean;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(Unit)\n unit: number;\n\n @ApiProperty()\n @IsNumber()\n @IsObjectId(ProductType)\n type: number;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n codeProduct?: string;\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  export declare class QueryThirdParty {
2
2
  search?: string;
3
3
  type?: number;
4
+ idThirdParty?: number;
4
5
  }
5
6
  //# sourceMappingURL=QueryThirdParty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryThirdParty.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/thirdParty/QueryThirdParty.ts"],"names":[],"mappings":"AAIA,qBAAa,eAAe;IAI1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"QueryThirdParty.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/thirdParty/QueryThirdParty.ts"],"names":[],"mappings":"AAMA,qBAAa,eAAe;IAI1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { IsEnum, IsOptional, IsString } from 'class-validator';
10
+ import { IsEnum, IsNumber, IsOptional, IsString, } from 'class-validator';
11
11
  import { ThirdPartyType } from '../../..';
12
12
  import { ApiPropertyOptional } from '../../../..';
13
13
  export class QueryThirdParty {
@@ -24,4 +24,10 @@ __decorate([
24
24
  IsEnum(ThirdPartyType),
25
25
  __metadata("design:type", Number)
26
26
  ], QueryThirdParty.prototype, "type", void 0);
27
+ __decorate([
28
+ ApiPropertyOptional(),
29
+ IsOptional(),
30
+ IsNumber(),
31
+ __metadata("design:type", Number)
32
+ ], QueryThirdParty.prototype, "idThirdParty", void 0);
27
33
  //# sourceMappingURL=QueryThirdParty.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryThirdParty.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/thirdParty/QueryThirdParty.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,OAAO,eAAe;CAU3B;AANC;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;+CACK;AAKhB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;6CACT","sourcesContent":["import { IsEnum, IsOptional, IsString } from 'class-validator';\nimport { ThirdPartyType } from '../../..';\nimport { ApiPropertyOptional } from '../../../..';\n\nexport class QueryThirdParty {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsEnum(ThirdPartyType)\n type?: number;\n}"]}
1
+ {"version":3,"file":"QueryThirdParty.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/thirdParty/QueryThirdParty.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,GACvC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,OAAO,eAAe;CAe3B;AAXC;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;+CACK;AAKhB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;6CACT;AAKd;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;qDACW","sourcesContent":["import {\n IsEnum, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { ThirdPartyType } from '../../..';\nimport { ApiPropertyOptional } from '../../../..';\n\nexport class QueryThirdParty {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsEnum(ThirdPartyType)\n type?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idThirdParty?: number;\n}"]}
@@ -10,7 +10,7 @@ import { IFile } from './IFile';
10
10
  import { IComptaType } from './IComptaType';
11
11
  import { IPartnerTransaction } from './IPartnerTransaction';
12
12
  import { ICurrency } from './ICurrency';
13
- import { IMachineLearningResult } from '../..';
13
+ import { IMachineLearningResult } from './IMachineLearningResult';
14
14
  export interface IAccountingTransaction {
15
15
  id?: number;
16
16
  label: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"IAccountingTransaction.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OA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AG,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACvC,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClC,sBAAsB,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"IAccountingTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { IBankAccount } from './IBankAccount';\nimport { IAccountingEntry } from './IAccountingEntry';\nimport { IAccountingFile } from './IAccountingFile';\nimport { IAccountingJournal } from './IAccountingJournal';\nimport { ISociety } from './ISociety';\nimport { IUser } from './IUser';\nimport { IRule } from './IRule';\nimport { IEstimateInvoice } from './IEstimateInvoice';\nimport { IFile } from './IFile';\nimport { IComptaType } from './IComptaType';\nimport { IPartnerTransaction } from './IPartnerTransaction';\nimport { ICurrency } from './ICurrency';\nimport { IMachineLearningResult } from '../..';\n\n// accountingTransactions\nexport interface IAccountingTransaction {\n id?: number;\n label: string | null;\n originalLabel?: string | null;\n invoiceNumber: string | null;\n reference: string | null;\n dateValue: Date;\n dateLocked?: Date | null;\n closingDate?: Date | null;\n dateVerified?: Date | null;\n originalValue?: number | null;\n idUser?: number | null;\n isBlocked?: boolean;\n isMerged?: boolean;\n isAsset?: boolean;\n isPayPerso?: boolean;\n isFecImport?: boolean;\n isManual?: boolean;\n exported: Date | null;\n kilometers?: number | null;\n purchaseTtc?: number | null;\n internComment?: string | null;\n isReadMobile?: boolean;\n invoiceRequested?: boolean;\n isLockedMobile?: boolean;\n isAlreadyProcessByOcr?: boolean | null;\n idBankAccount: number | null;\n idSociety: number;\n idCurrency?: number | null;\n idPaymentMethod?: number | null;\n idSocietyVehicle?: number | null;\n idSocietyPartner?: number | null;\n idRule?: number | null;\n idAccountingJournal: number;\n idTypeCompta?: number | null;\n idEstimateInvoice?: number | null;\n idFile?: number | null;\n idEBT?: number | null;\n idEAF?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n bankAccount?: IBankAccount;\n accountingEntries?: IAccountingEntry[];\n accountingFiles?: IAccountingFile[];\n accountingJournal?: IAccountingJournal;\n currency?: ICurrency;\n society?: ISociety;\n user?: IUser;\n rule?: IRule;\n estimatesInvoice?: IEstimateInvoice;\n file?: IFile;\n typeComptum?: IComptaType;\n partnersTransaction?: IPartnerTransaction | null;\n parents?: IAccountingTransaction[];\n childs?: IAccountingTransaction[];\n machineLearningResults?: IMachineLearningResult[];\n}\n"]}
1
+ {"version":3,"file":"IAccountingTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { IBankAccount } from './IBankAccount';\nimport { IAccountingEntry } from './IAccountingEntry';\nimport { IAccountingFile } from './IAccountingFile';\nimport { IAccountingJournal } from './IAccountingJournal';\nimport { ISociety } from './ISociety';\nimport { IUser } from './IUser';\nimport { IRule } from './IRule';\nimport { IEstimateInvoice } from './IEstimateInvoice';\nimport { IFile } from './IFile';\nimport { IComptaType } from './IComptaType';\nimport { IPartnerTransaction } from './IPartnerTransaction';\nimport { ICurrency } from './ICurrency';\nimport { IMachineLearningResult } from './IMachineLearningResult';\n\n// accountingTransactions\nexport interface IAccountingTransaction {\n id?: number;\n label: string | null;\n originalLabel?: string | null;\n invoiceNumber: string | null;\n reference: string | null;\n dateValue: Date;\n dateLocked?: Date | null;\n closingDate?: Date | null;\n dateVerified?: Date | null;\n originalValue?: number | null;\n idUser?: number | null;\n isBlocked?: boolean;\n isMerged?: boolean;\n isAsset?: boolean;\n isPayPerso?: boolean;\n isFecImport?: boolean;\n isManual?: boolean;\n exported: Date | null;\n kilometers?: number | null;\n purchaseTtc?: number | null;\n internComment?: string | null;\n isReadMobile?: boolean;\n invoiceRequested?: boolean;\n isLockedMobile?: boolean;\n isAlreadyProcessByOcr?: boolean | null;\n idBankAccount: number | null;\n idSociety: number;\n idCurrency?: number | null;\n idPaymentMethod?: number | null;\n idSocietyVehicle?: number | null;\n idSocietyPartner?: number | null;\n idRule?: number | null;\n idAccountingJournal: number;\n idTypeCompta?: number | null;\n idEstimateInvoice?: number | null;\n idFile?: number | null;\n idEBT?: number | null;\n idEAF?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n bankAccount?: IBankAccount;\n accountingEntries?: IAccountingEntry[];\n accountingFiles?: IAccountingFile[];\n accountingJournal?: IAccountingJournal;\n currency?: ICurrency;\n society?: ISociety;\n user?: IUser;\n rule?: IRule;\n estimatesInvoice?: IEstimateInvoice;\n file?: IFile;\n typeComptum?: IComptaType;\n partnersTransaction?: IPartnerTransaction | null;\n parents?: IAccountingTransaction[];\n childs?: IAccountingTransaction[];\n machineLearningResults?: IMachineLearningResult[];\n}\n"]}
@@ -20,6 +20,7 @@ export declare enum Code {
20
20
  failedCheckBalance = "failed_check_balance",
21
21
  vatIntracomCanOnlyBeSetForDebit = "vat_intracom_can_only_be_set_for_debit",
22
22
  vatMargeCanOnlyBeSetForCredit = "vat_marge_can_only_be_set_for_credit",
23
+ vatMargeWithAssetCanOnlyBeSetForDebit = "vat_marge_with_asset_can_only_be_set_for_debit",
23
24
  vatMargeCanOnlyBeSetIfAmountAllTaxIncludedPurchaseIsSet = "vat_marge_can_only_be_set_if_amount_all_tax_included_purchase_is_set",
24
25
  missingParamSplit = "missing_param_split",
25
26
  totalAmountSplitNotEqualTransaction = "total_amount_split_not_equal_transaction",
@@ -1 +1 @@
1
- {"version":3,"file":"IApiError.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IApiError.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACnB,QAAQ,cAAc;IACtB,SAAS,yBAAyB;IAClC,aAAa,cAAc;CAC5B;AAED,oBAAY,IAAI;IAEd,YAAY,iCAAiC;IAC7C,qBAAqB,uCAAuC;IAC5D,QAAQ,uBAAuB;IAC/B,YAAY,mBAAmB;IAC/B,eAAe,8BAA8B;IAC7C,eAAe,8BAA8B;IAC7C,UAAU,iBAAiB;IAC3B,mBAAmB,0BAA0B;IAC7C,kBAAkB,sBAAsB;IACxC,kBAAkB,wBAAwB;IAC1C,cAAc,oBAAoB;IAClC,OAAO,YAAY;IACnB,mBAAmB,0BAA0B;IAG7C,kBAAkB,yBAAyB;IAC3C,+BAA+B,2CAA2C;IAC1E,6BAA6B,yCAAyC;IACtE,uDAAuD,yEAAyE;IAChI,iBAAiB,wBAAwB;IACzC,mCAAmC,6CAA6C;IAChF,+BAA+B,0CAA0C;IACzE,+BAA+B,2CAA2C;IAC1E,6BAA6B,wCAAwC;IACr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BAAsB;IAGrC,gBAAgB,uBAAuB;IACvC,WAAW,gBAAgB;IAG3B,8BAA8B,uCAAuC;IACrE,kCAAkC,2CAA2C;IAC7E,0BAA0B,kCAAkC;IAC5D,0BAA0B,kCAAkC;IAC5D,eAAe,sBAAsB;IAErC,cAAc,qBAAqB;IAGnC,cAAc,qBAAqB;IAGnC,4BAA4B,uCAAuC;IACnE,qBAAqB,4BAA4B;IACjD,sBAAsB,8BAA8B;IACpD,uBAAuB,8BAA8B;IACrD,mBAAmB,2BAA2B;IAC9C,8BAA8B,sCAAsC;IACpE,iBAAiB,wBAAwB;IAGzC,yBAAyB,8BAA8B;IAGvD,oBAAoB,yBAAyB;IAC7C,kBAAkB,uBAAuB;IACzC,qBAAqB,0BAA0B;IAC/C,mCAAmC,wCAAwC;IAG3E,uBAAuB,4BAA4B;IACnD,mBAAmB,wBAAwB;IAG3C,oBAAoB,yBAAyB;IAG7C,yBAAyB,8BAA8B;IAEvD,gCAAgC,qCAAqC;IACrE,4BAA4B,iCAAiC;IAC7D,yBAAyB,8BAA8B;IACvD,uBAAuB,4BAA4B;IACnD,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,oBAAoB,yBAAyB;IAG7C,uBAAuB,4BAA4B;IACnD,oBAAoB,yBAAyB;CAC9C;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
@@ -24,6 +24,7 @@ export var Code;
24
24
  Code["failedCheckBalance"] = "failed_check_balance";
25
25
  Code["vatIntracomCanOnlyBeSetForDebit"] = "vat_intracom_can_only_be_set_for_debit";
26
26
  Code["vatMargeCanOnlyBeSetForCredit"] = "vat_marge_can_only_be_set_for_credit";
27
+ Code["vatMargeWithAssetCanOnlyBeSetForDebit"] = "vat_marge_with_asset_can_only_be_set_for_debit";
27
28
  Code["vatMargeCanOnlyBeSetIfAmountAllTaxIncludedPurchaseIsSet"] = "vat_marge_can_only_be_set_if_amount_all_tax_included_purchase_is_set";
28
29
  Code["missingParamSplit"] = "missing_param_split";
29
30
  Code["totalAmountSplitNotEqualTransaction"] = "total_amount_split_not_equal_transaction";
@@ -1 +1 @@
1
- {"version":3,"file":"IApiError.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IApiError.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,+CAAkC,CAAA;IAClC,wCAA2B,CAAA;AAC7B,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAED,MAAM,CAAN,IAAY,IAwKX;AAxKD,WAAY,IAAI;IACd,aAAa;IACb,qDAA6C,CAAA;IAC7C,oEAA4D,CAAA;IAC5D,uCAA+B,CAAA;IAC/B,uCAA+B,CAAA;IAC/B,qDAA6C,CAAA;IAC7C,qDAA6C,CAAA;IAC7C,mCAA2B,CAAA;IAC3B,qDAA6C,CAAA;IAC7C,gDAAwC,CAAA;IACxC,kDAA0C,CAAA;IAC1C,0CAAkC,CAAA;IAClC,2BAAmB,CAAA;IACnB,qDAA6C,CAAA;IAE7C,mBAAmB;IACnB,mDAA2C,CAAA;IAC3C,kFAA0E,CAAA;IAC1E,8EAAsE,CAAA;IACtE,wIAAgI,CAAA;IAChI,iDAAyC,CAAA;IACzC,wFAAgF,CAAA;IAChF,iFAAyE,CAAA;IACzE,kFAA0E,CAAA;IAC1E,6EAAqE,CAAA;IACrE,8EAAsE,CAAA;IACtE,wEAAgE,CAAA;IAChE,yDAAiD,CAAA;IACjD,kDAA0C,CAAA;IAC1C,iGAAyF,CAAA;IACzF,uFAA+E,CAAA;IAC/E,iGAAyF,CAAA;IACzF,2DAAmD,CAAA;IACnD,8DAAsD,CAAA;IACtD,sDAA8C,CAAA;IAC9C,iFAAyE,CAAA;IACzE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IAC/B,+EAAuE,CAAA;IACvE,8DAAsD,CAAA;IACtD,2DAAmD,CAAA;IACnD,gDAAwC,CAAA;IACxC,6CAAqC,CAAA;IAErC,QAAQ;IACR,+CAAuC,CAAA;IACvC,mCAA2B,CAAA;IAE3B,cAAc;IACd,6EAAqE,CAAA;IACrE,qFAA6E,CAAA;IAC7E,oEAA4D,CAAA;IAC5D,oEAA4D,CAAA;IAC5D,6CAAqC,CAAA;IAErC,2CAAmC,CAAA;IAEnC,YAAY;IACZ,2CAAmC,CAAA;IAEnC,eAAe;IACf,2EAAmE,CAAA;IACnE,yDAAiD,CAAA;IACjD,4DAAoD,CAAA;IACpD,6DAAqD,CAAA;IACrD,sDAA8C,CAAA;IAC9C,4EAAoE,CAAA;IACpE,iDAAyC,CAAA;IAEzC,WAAW;IACX,+DAAuD,CAAA;IAEvD,0BAA0B;IAC1B,qDAA6C,CAAA;IAC7C,iDAAyC,CAAA;IACzC,uDAA+C,CAAA;IAC/C,mFAA2E,CAAA;IAE3E,wBAAwB;IACxB,2DAAmD,CAAA;IACnD,mDAA2C,CAAA;IAE3C,mBAAmB;IACnB,qDAA6C,CAAA;IAE7C,mBAAmB;IACnB,+DAAuD,CAAA;IAEvD,6EAAqE,CAAA;IACrE,qEAA6D,CAAA;IAC7D,+DAAuD,CAAA;IACvD,2DAAmD,CAAA;IACnD,uCAA+B,CAAA;IAC/B,mCAA2B,CAAA;IAC3B,qDAA6C,CAAA;IAE7C,SAAS;IACT,2DAAmD,CAAA;IACnD,qDAA6C,CAAA;AAC/C,CAAC,EAxKW,IAAI,KAAJ,IAAI,QAwKf","sourcesContent":["export enum ErrorType {\n apiError = 'api_error',\n authError = 'authentication_error',\n resourceError = 'rsc_error',\n}\n\nexport enum Code {\n // HTTP Error\n tokenFailure = 'token_authentication_failure',\n authenticationFailure = 'authentication_credentials_failure',\n notFound = 'resource_not_found',\n fileNotFound = 'file_not_found',\n validationError = 'resource_validation_error',\n constraintError = 'resource_constraint_error',\n outOfRange = 'resource_ofr',\n internalServerError = 'internal_server_error',\n constraintKeyError = 'resource_fk_error',\n serviceUnavailable = 'service_unavailable',\n notImplemented = 'not_implemented',\n unknown = 'unknown',\n formatNotAuthorized = 'format_not_authorized',\n\n // Annotation Error\n failedCheckBalance = 'failed_check_balance',\n vatIntracomCanOnlyBeSetForDebit = 'vat_intracom_can_only_be_set_for_debit',\n vatMargeCanOnlyBeSetForCredit = 'vat_marge_can_only_be_set_for_credit',\n vatMargeCanOnlyBeSetIfAmountAllTaxIncludedPurchaseIsSet = 'vat_marge_can_only_be_set_if_amount_all_tax_included_purchase_is_set',\n missingParamSplit = 'missing_param_split',\n totalAmountSplitNotEqualTransaction = 'total_amount_split_not_equal_transaction',\n vatManuelIsSetWithNegativeValue = 'vat_manuel_is_set_with_negative_value',\n vatManuelIsNotSetWithSpecialVat = 'vat_manuel_is_not_set_with_special_vat',\n vatManuelCannotBeSetWithSplit = 'vat_manuel_cannot_be_set_with_split',\n vatNotAuthorizeWithThisAccount = 'vat_not_authorize_with_this_account',\n transactionIsAlreadyExported = 'transaction_is_already_exported',\n thirdPartyIsNotFound = 'third_party_is_not_found',\n accountIsNotFound = 'account_is_not_found',\n immobilizationNotSetWithAccountStartTwo = 'immobilization_not_set_with_account_start_two',\n immobilizationCanOnlyBeSetForDebit = 'immobilization_can_only_be_set_for_debit',\n immobilizationCanNotBeSetWithoutAccount = 'immobilization_can_not_be_set_without_account',\n immobilizationNotExist = 'immobilization_not_exist',\n accountIsNotDepreciable = 'account_is_not_depreciable',\n invalidNetBookValue = 'invalid_net_book_value',\n noExerciceFoundForImmobilization = 'no_exercice_found_for_immobilization',\n amountImmobilizationLessThanAmountTransaction = 'amount_immobilization_less_than_amount_transaction',\n amountImmobilizationLessThanAmountAllTaxIncluded = 'amount_immobilization_less_than_amount_all_tax_included',\n amountImmobilizationIsGreaterThanTotalAmountTransactions = 'amount_immobilization_is_greater_than_total_amount_transactions',\n immobilizationNotFound = 'immobilization_not_found',\n annotationFailed = 'annotation_failed',\n\n // PDF error\n mergeFailed = 'merge_failed',\n generationError = 'generation_error',\n parseError = 'parse_error',\n\n // Email error\n emailAlreadyExist = 'email_already_exist',\n phoneAlreadyExist = 'phone_already_exist',\n societyCustomEmailAlreadyExist = 'society_custom_email_already_exist',\n societyCustomEmailNotFound = 'society_custom_email_not_found',\n emailNotFound = 'email_not_found',\n\n // BankAccount\n missingParamAccountNumber = 'missing_param_account_number',\n accountNumberParamNotFound = 'account_number_param_not_found',\n\n // Income statement\n invalidIncomeStatementList = 'invalid_income_statement_list',\n\n // Shine errors\n AUTHORIZATION_CLIENT_NOT_FOUND = 'AUTHORIZATION_CLIENT_NOT_FOUND',\n AUTHORIZATION_CLIENT_SECRET_DOES_NOT_MATCH = 'AUTHORIZATION_CLIENT_SECRET_DOES_NOT_MATCH',\n AUTHORIZATION_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_REDIRECT_URI_DOES_NOT_MATCH',\n AUTHORIZATION_REQUESTED_SCOPE_NOT_AVAILABLE = 'AUTHORIZATION_REQUESTED_SCOPE_NOT_AVAILABLE',\n AUTHORIZATION_REQUESTED_SCOPE_NOT_AUTHORIZED = 'AUTHORIZATION_REQUESTED_SCOPE_NOT_AUTHORIZED',\n AUTHORIZATION_REQUESTED_SCOPE_MISSING_OPENID = 'AUTHORIZATION_REQUESTED_SCOPE_MISSING_OPENID',\n AUTHORIZATION_CLIENT_STATUS_NOT_VALID = 'AUTHORIZATION_CLIENT_STATUS_NOT_VALID',\n AUTHORIZATION_CODE_MISSING = 'AUTHORIZATION_CODE_MISSING',\n AUTHORIZATION_CODE_NOT_FOUND = 'AUTHORIZATION_CODE_NOT_FOUND',\n AUTHORIZATION_CODE_ALREADY_USED = 'AUTHORIZATION_CODE_ALREADY_USED',\n AUTHORIZATION_CODE_EXPIRED = 'AUTHORIZATION_CODE_EXPIRED',\n AUTHORIZATION_CODE_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_CODE_REDIRECT_URI_DOES_NOT_MATCH',\n AUTHORIZATION_ACCESS_TOKEN_EXPIRED = 'AUTHORIZATION_ACCESS_TOKEN_EXPIRED',\n AUTHORIZATION_INVALID_ACCESS_TOKEN = 'AUTHORIZATION_INVALID_ACCESS_TOKEN',\n AUTHORIZATION_MISSING_ACCESS_TOKEN = 'AUTHORIZATION_MISSING_ACCESS_TOKEN',\n AUTHORIZATION_ACCESS_TOKEN_WRONG_AUDIENCE = 'AUTHORIZATION_ACCESS_TOKEN_WRONG_AUDIENCE',\n AUTHORIZATION_ACCESS_TOKEN_MISSING_SCOPE = 'AUTHORIZATION_ACCESS_TOKEN_MISSING_SCOPE',\n AUTHORIZATION_ACCESS_TOKEN_FORBIDDEN = 'AUTHORIZATION_ACCESS_TOKEN_FORBIDDEN',\n AUTHORIZATION_UNSUPPORTED_RESPONSE_TYPE = 'AUTHORIZATION_UNSUPPORTED_RESPONSE_TYPE',\n AUTHORIZATION_UNSUPPORTED_GRANT_TYPE = 'AUTHORIZATION_UNSUPPORTED_GRANT_TYPE',\n AUTHORIZATION_REFRESH_TOKEN_MISSING = 'AUTHORIZATION_REFRESH_TOKEN_MISSING',\n AUTHORIZATION_REFRESH_TOKEN_EXPIRED = 'AUTHORIZATION_REFRESH_TOKEN_EXPIRED',\n AUTHORIZATION_REFRESH_TOKEN_INVALID = 'AUTHORIZATION_REFRESH_TOKEN_INVALID',\n AUTHORIZATION_REFRESH_TOKEN_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_REFRESH_TOKEN_REDIRECT_URI_DOES_NOT_MATCH',\n AUTHORIZATION_REFRESH_TOKEN_REVOKED = 'AUTHORIZATION_REFRESH_TOKEN_REVOKED',\n AUTHORIZATION_USER_NOT_AUTHORIZED = 'AUTHORIZATION_USER_NOT_AUTHORIZED',\n responseNotManaged = 'response_not_managed',\n bankAccountsError = 'bank_accounts_error',\n refreshTokenError = 'refresh_token_error',\n\n // Balance Sheet\n invalidBalanceSheetList = 'invalid_balance_sheet_list',\n\n // FecFile\n insertAccountingTransactionFailed = 'insert_accounting_transaction_failed',\n fecFileAlreadyExists = 'fec_file_already_exists',\n\n // User creation\n userAlreadyExistWithSociety = 'user-already-exists',\n userDoesNotExists = 'user-does-not-exist',\n userPermissionDoesNotExists = 'user-permission-does-not-exist',\n expiredSmsCode = 'expired-sms-code',\n userNotInFmaProcess = 'user-not-in-maf-process',\n wrongSmsCode = 'wrong-sms-code',\n userEmailAndPhoneAlreadyExist = 'user-username-and-phone-already-exist',\n userEmailAlreadyExist = 'user-username-already-exists',\n userPhoneAlreadyExist = 'user-phone-already-exists',\n couldNotFindUser = 'could-not-find-user',\n wrongBrandEmail = 'wrong-brand-email',\n\n // Cerfa\n civilityNotFound = 'civility_not_found',\n invalidData = 'invalidData',\n\n // Sponsorship\n emailAlreadyUsedForsponsorship = 'email_already_used_for_sponsorship',\n idSocietyAlreadyUsedForsponsorship = 'idSociety_already_used_for_sponsorship',\n sponsorshipCodeDoesntExist = 'sponsorship_code_doesnt_exist',\n sponsorshipLinkDoesntExist = 'sponsorship_link_doesnt_exist',\n societyNotFound = 'society_not_found',\n\n payloadIsEmpty = 'payload_is_empty',\n\n // PromoCode\n wrongPromoCode = 'wrong_promo_code',\n\n // Budget Fetch\n fetchNewBudgetInvalidSociety = 'fetch_new_budget_invalid_idSociety',\n fetchConnectionFailed = 'fetch_connection_failed',\n fetchBankAccountFailed = 'fetch_bank_account_failed',\n fetchTransactionsFailed = 'fetch_transactions_failed',\n fetchNewTokenFailed = 'fetch_new_token_failed',\n bankAccountDesactivationFailed = 'bank_account_desactivation_failed',\n udpateTokenFailed = 'update_token_failed',\n\n // Accounts\n GENERIC_ACCOUNT_NOT_FOUND = 'GENERIC_ACCOUNT_NOT_FOUND',\n\n // Balance Sheet Questions\n UNKNOWN_ANSWER_VALUE = 'UNKNOWN_ANSWER_VALUE',\n QUESTION_NOT_FOUND = 'QUESTION_NOT_FOUND',\n QUESTION_DO_NOT_MATCH = 'QUESTION_DO_NOT_MATCH',\n QUESTION_ALREADY_EXISTS_IN_EXERCICE = 'QUESTION_ALREADY_EXISTS_IN_EXERCICE',\n\n // Fiscal period closing\n EXERCICE_ALREADY_CLOSED = 'EXERCICE_ALREADY_CLOSED',\n MISSING_ANNOTATIONS = 'MISSING_ANNOTATIONS',\n\n // jeDeclare errors\n ERR_INVALID_ARG_TYPE = 'ERR_INVALID_ARG_TYPE',\n\n // Society Vehicles\n MISSING_REGISTRATION_CARD = 'MISSING_REGISTRATION_CARD',\n\n PREVIOUS_CHECKLIST_NOT_COMPLETED = 'previous_checklist_not_completed',\n CAN_NOT_EDIT_COMPLETED_ISSUE = 'can_not_edit_completed_issue',\n CAN_NOT_CONFIRM_CHECKLIST = 'can_not_confirm_checklist',\n CHECKLIST_ALREADY_EXIST = 'checklist_already_exist',\n INVALID_BRAND = 'invalid_brand',\n INVALID_DAY = 'invalid_day',\n ENTITY_ALREADY_EXIST = 'entity_already_exist',\n\n // Gescom\n CAN_NOT_DELETE_DOCUMENT = 'can_not_delete_document',\n CAN_NOT_EDIT_INVOICE = 'can_not_edit_invoice',\n}\n\nexport interface IApiError {\n type: ErrorType;\n code: Code;\n message: string;\n param?: string;\n field?: string;\n}\n"]}
1
+ {"version":3,"file":"IApiError.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IApiError.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,mCAAsB,CAAA;IACtB,+CAAkC,CAAA;IAClC,wCAA2B,CAAA;AAC7B,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB;AAED,MAAM,CAAN,IAAY,IAyKX;AAzKD,WAAY,IAAI;IACd,aAAa;IACb,qDAA6C,CAAA;IAC7C,oEAA4D,CAAA;IAC5D,uCAA+B,CAAA;IAC/B,uCAA+B,CAAA;IAC/B,qDAA6C,CAAA;IAC7C,qDAA6C,CAAA;IAC7C,mCAA2B,CAAA;IAC3B,qDAA6C,CAAA;IAC7C,gDAAwC,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AmB;IACnB,qDAA6C,CAAA;IAE7C,mBAAmB;IACnB,+DAAuD,CAAA;IAEvD,6EAAqE,CAAA;IACrE,qEAA6D,CAAA;IAC7D,+DAAuD,CAAA;IACvD,2DAAmD,CAAA;IACnD,uCAA+B,CAAA;IAC/B,mCAA2B,CAAA;IAC3B,qDAA6C,CAAA;IAE7C,SAAS;IACT,2DAAmD,CAAA;IACnD,qDAA6C,CAAA;AAC/C,CAAC,EAzKW,IAAI,KAAJ,IAAI,QAyKf","sourcesContent":["export enum ErrorType {\n apiError = 'api_error',\n authError = 'authentication_error',\n resourceError = 'rsc_error',\n}\n\nexport enum Code {\n // HTTP Error\n tokenFailure = 'token_authentication_failure',\n authenticationFailure = 'authentication_credentials_failure',\n notFound = 'resource_not_found',\n fileNotFound = 'file_not_found',\n validationError = 'resource_validation_error',\n constraintError = 'resource_constraint_error',\n outOfRange = 'resource_ofr',\n internalServerError = 'internal_server_error',\n constraintKeyError = 'resource_fk_error',\n serviceUnavailable = 'service_unavailable',\n notImplemented = 'not_implemented',\n unknown = 'unknown',\n formatNotAuthorized = 'format_not_authorized',\n\n // Annotation Error\n failedCheckBalance = 'failed_check_balance',\n vatIntracomCanOnlyBeSetForDebit = 'vat_intracom_can_only_be_set_for_debit',\n vatMargeCanOnlyBeSetForCredit = 'vat_marge_can_only_be_set_for_credit',\n vatMargeWithAssetCanOnlyBeSetForDebit = 'vat_marge_with_asset_can_only_be_set_for_debit',\n vatMargeCanOnlyBeSetIfAmountAllTaxIncludedPurchaseIsSet = 'vat_marge_can_only_be_set_if_amount_all_tax_included_purchase_is_set',\n missingParamSplit = 'missing_param_split',\n totalAmountSplitNotEqualTransaction = 'total_amount_split_not_equal_transaction',\n vatManuelIsSetWithNegativeValue = 'vat_manuel_is_set_with_negative_value',\n vatManuelIsNotSetWithSpecialVat = 'vat_manuel_is_not_set_with_special_vat',\n vatManuelCannotBeSetWithSplit = 'vat_manuel_cannot_be_set_with_split',\n vatNotAuthorizeWithThisAccount = 'vat_not_authorize_with_this_account',\n transactionIsAlreadyExported = 'transaction_is_already_exported',\n thirdPartyIsNotFound = 'third_party_is_not_found',\n accountIsNotFound = 'account_is_not_found',\n immobilizationNotSetWithAccountStartTwo = 'immobilization_not_set_with_account_start_two',\n immobilizationCanOnlyBeSetForDebit = 'immobilization_can_only_be_set_for_debit',\n immobilizationCanNotBeSetWithoutAccount = 'immobilization_can_not_be_set_without_account',\n immobilizationNotExist = 'immobilization_not_exist',\n accountIsNotDepreciable = 'account_is_not_depreciable',\n invalidNetBookValue = 'invalid_net_book_value',\n noExerciceFoundForImmobilization = 'no_exercice_found_for_immobilization',\n amountImmobilizationLessThanAmountTransaction = 'amount_immobilization_less_than_amount_transaction',\n amountImmobilizationLessThanAmountAllTaxIncluded = 'amount_immobilization_less_than_amount_all_tax_included',\n amountImmobilizationIsGreaterThanTotalAmountTransactions = 'amount_immobilization_is_greater_than_total_amount_transactions',\n immobilizationNotFound = 'immobilization_not_found',\n annotationFailed = 'annotation_failed',\n\n // PDF error\n mergeFailed = 'merge_failed',\n generationError = 'generation_error',\n parseError = 'parse_error',\n\n // Email error\n emailAlreadyExist = 'email_already_exist',\n phoneAlreadyExist = 'phone_already_exist',\n societyCustomEmailAlreadyExist = 'society_custom_email_already_exist',\n societyCustomEmailNotFound = 'society_custom_email_not_found',\n emailNotFound = 'email_not_found',\n\n // BankAccount\n missingParamAccountNumber = 'missing_param_account_number',\n accountNumberParamNotFound = 'account_number_param_not_found',\n\n // Income statement\n invalidIncomeStatementList = 'invalid_income_statement_list',\n\n // Shine errors\n AUTHORIZATION_CLIENT_NOT_FOUND = 'AUTHORIZATION_CLIENT_NOT_FOUND',\n AUTHORIZATION_CLIENT_SECRET_DOES_NOT_MATCH = 'AUTHORIZATION_CLIENT_SECRET_DOES_NOT_MATCH',\n AUTHORIZATION_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_REDIRECT_URI_DOES_NOT_MATCH',\n AUTHORIZATION_REQUESTED_SCOPE_NOT_AVAILABLE = 'AUTHORIZATION_REQUESTED_SCOPE_NOT_AVAILABLE',\n AUTHORIZATION_REQUESTED_SCOPE_NOT_AUTHORIZED = 'AUTHORIZATION_REQUESTED_SCOPE_NOT_AUTHORIZED',\n AUTHORIZATION_REQUESTED_SCOPE_MISSING_OPENID = 'AUTHORIZATION_REQUESTED_SCOPE_MISSING_OPENID',\n AUTHORIZATION_CLIENT_STATUS_NOT_VALID = 'AUTHORIZATION_CLIENT_STATUS_NOT_VALID',\n AUTHORIZATION_CODE_MISSING = 'AUTHORIZATION_CODE_MISSING',\n AUTHORIZATION_CODE_NOT_FOUND = 'AUTHORIZATION_CODE_NOT_FOUND',\n AUTHORIZATION_CODE_ALREADY_USED = 'AUTHORIZATION_CODE_ALREADY_USED',\n AUTHORIZATION_CODE_EXPIRED = 'AUTHORIZATION_CODE_EXPIRED',\n AUTHORIZATION_CODE_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_CODE_REDIRECT_URI_DOES_NOT_MATCH',\n AUTHORIZATION_ACCESS_TOKEN_EXPIRED = 'AUTHORIZATION_ACCESS_TOKEN_EXPIRED',\n AUTHORIZATION_INVALID_ACCESS_TOKEN = 'AUTHORIZATION_INVALID_ACCESS_TOKEN',\n AUTHORIZATION_MISSING_ACCESS_TOKEN = 'AUTHORIZATION_MISSING_ACCESS_TOKEN',\n AUTHORIZATION_ACCESS_TOKEN_WRONG_AUDIENCE = 'AUTHORIZATION_ACCESS_TOKEN_WRONG_AUDIENCE',\n AUTHORIZATION_ACCESS_TOKEN_MISSING_SCOPE = 'AUTHORIZATION_ACCESS_TOKEN_MISSING_SCOPE',\n AUTHORIZATION_ACCESS_TOKEN_FORBIDDEN = 'AUTHORIZATION_ACCESS_TOKEN_FORBIDDEN',\n AUTHORIZATION_UNSUPPORTED_RESPONSE_TYPE = 'AUTHORIZATION_UNSUPPORTED_RESPONSE_TYPE',\n AUTHORIZATION_UNSUPPORTED_GRANT_TYPE = 'AUTHORIZATION_UNSUPPORTED_GRANT_TYPE',\n AUTHORIZATION_REFRESH_TOKEN_MISSING = 'AUTHORIZATION_REFRESH_TOKEN_MISSING',\n AUTHORIZATION_REFRESH_TOKEN_EXPIRED = 'AUTHORIZATION_REFRESH_TOKEN_EXPIRED',\n AUTHORIZATION_REFRESH_TOKEN_INVALID = 'AUTHORIZATION_REFRESH_TOKEN_INVALID',\n AUTHORIZATION_REFRESH_TOKEN_REDIRECT_URI_DOES_NOT_MATCH = 'AUTHORIZATION_REFRESH_TOKEN_REDIRECT_URI_DOES_NOT_MATCH',\n AUTHORIZATION_REFRESH_TOKEN_REVOKED = 'AUTHORIZATION_REFRESH_TOKEN_REVOKED',\n AUTHORIZATION_USER_NOT_AUTHORIZED = 'AUTHORIZATION_USER_NOT_AUTHORIZED',\n responseNotManaged = 'response_not_managed',\n bankAccountsError = 'bank_accounts_error',\n refreshTokenError = 'refresh_token_error',\n\n // Balance Sheet\n invalidBalanceSheetList = 'invalid_balance_sheet_list',\n\n // FecFile\n insertAccountingTransactionFailed = 'insert_accounting_transaction_failed',\n fecFileAlreadyExists = 'fec_file_already_exists',\n\n // User creation\n userAlreadyExistWithSociety = 'user-already-exists',\n userDoesNotExists = 'user-does-not-exist',\n userPermissionDoesNotExists = 'user-permission-does-not-exist',\n expiredSmsCode = 'expired-sms-code',\n userNotInFmaProcess = 'user-not-in-maf-process',\n wrongSmsCode = 'wrong-sms-code',\n userEmailAndPhoneAlreadyExist = 'user-username-and-phone-already-exist',\n userEmailAlreadyExist = 'user-username-already-exists',\n userPhoneAlreadyExist = 'user-phone-already-exists',\n couldNotFindUser = 'could-not-find-user',\n wrongBrandEmail = 'wrong-brand-email',\n\n // Cerfa\n civilityNotFound = 'civility_not_found',\n invalidData = 'invalidData',\n\n // Sponsorship\n emailAlreadyUsedForsponsorship = 'email_already_used_for_sponsorship',\n idSocietyAlreadyUsedForsponsorship = 'idSociety_already_used_for_sponsorship',\n sponsorshipCodeDoesntExist = 'sponsorship_code_doesnt_exist',\n sponsorshipLinkDoesntExist = 'sponsorship_link_doesnt_exist',\n societyNotFound = 'society_not_found',\n\n payloadIsEmpty = 'payload_is_empty',\n\n // PromoCode\n wrongPromoCode = 'wrong_promo_code',\n\n // Budget Fetch\n fetchNewBudgetInvalidSociety = 'fetch_new_budget_invalid_idSociety',\n fetchConnectionFailed = 'fetch_connection_failed',\n fetchBankAccountFailed = 'fetch_bank_account_failed',\n fetchTransactionsFailed = 'fetch_transactions_failed',\n fetchNewTokenFailed = 'fetch_new_token_failed',\n bankAccountDesactivationFailed = 'bank_account_desactivation_failed',\n udpateTokenFailed = 'update_token_failed',\n\n // Accounts\n GENERIC_ACCOUNT_NOT_FOUND = 'GENERIC_ACCOUNT_NOT_FOUND',\n\n // Balance Sheet Questions\n UNKNOWN_ANSWER_VALUE = 'UNKNOWN_ANSWER_VALUE',\n QUESTION_NOT_FOUND = 'QUESTION_NOT_FOUND',\n QUESTION_DO_NOT_MATCH = 'QUESTION_DO_NOT_MATCH',\n QUESTION_ALREADY_EXISTS_IN_EXERCICE = 'QUESTION_ALREADY_EXISTS_IN_EXERCICE',\n\n // Fiscal period closing\n EXERCICE_ALREADY_CLOSED = 'EXERCICE_ALREADY_CLOSED',\n MISSING_ANNOTATIONS = 'MISSING_ANNOTATIONS',\n\n // jeDeclare errors\n ERR_INVALID_ARG_TYPE = 'ERR_INVALID_ARG_TYPE',\n\n // Society Vehicles\n MISSING_REGISTRATION_CARD = 'MISSING_REGISTRATION_CARD',\n\n PREVIOUS_CHECKLIST_NOT_COMPLETED = 'previous_checklist_not_completed',\n CAN_NOT_EDIT_COMPLETED_ISSUE = 'can_not_edit_completed_issue',\n CAN_NOT_CONFIRM_CHECKLIST = 'can_not_confirm_checklist',\n CHECKLIST_ALREADY_EXIST = 'checklist_already_exist',\n INVALID_BRAND = 'invalid_brand',\n INVALID_DAY = 'invalid_day',\n ENTITY_ALREADY_EXIST = 'entity_already_exist',\n\n // Gescom\n CAN_NOT_DELETE_DOCUMENT = 'can_not_delete_document',\n CAN_NOT_EDIT_INVOICE = 'can_not_edit_invoice',\n}\n\nexport interface IApiError {\n type: ErrorType;\n code: Code;\n message: string;\n param?: string;\n field?: string;\n}\n"]}
@@ -1,4 +1,3 @@
1
- import { IEstimateInvoice } from '../..';
2
1
  export interface ICommercialMail {
3
2
  id?: number;
4
3
  to: string;
@@ -6,9 +5,8 @@ export interface ICommercialMail {
6
5
  bcc?: string | null;
7
6
  subject: string;
8
7
  content: string;
8
+ idFile: number;
9
9
  createdAt?: Date;
10
10
  updatedAt?: Date;
11
- idEstimateInvoice: number;
12
- estimateInvoice?: IEstimateInvoice;
13
11
  }
14
12
  //# sourceMappingURL=ICommercialMail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ICommercialMail.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ICommercialMail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAE1B,eAAe,CAAC,EAAE,gBAAgB,CAAC;CACpC"}
1
+ {"version":3,"file":"ICommercialMail.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ICommercialMail.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ICommercialMail.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ICommercialMail.ts"],"names":[],"mappings":"","sourcesContent":["import { IEstimateInvoice } from '../..';\n\nexport interface ICommercialMail {\n id?: number;\n to: string;\n cc?: string | null;\n bcc?: string | null;\n subject: string;\n content: string;\n createdAt?: Date;\n updatedAt?: Date;\n idEstimateInvoice: number;\n\n estimateInvoice?: IEstimateInvoice;\n}"]}
1
+ {"version":3,"file":"ICommercialMail.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ICommercialMail.ts"],"names":[],"mappings":"","sourcesContent":["export interface ICommercialMail {\n id?: number;\n to: string;\n cc?: string | null;\n bcc?: string | null;\n subject: string;\n content: string;\n idFile: number;\n createdAt?: Date;\n updatedAt?: Date;\n}"]}
@@ -3,7 +3,6 @@ import { IEngagementAccountingEntry } from './IEngagementAccountingEntry';
3
3
  import { IAccountingJournal } from './IAccountingJournal';
4
4
  import { IUser } from './IUser';
5
5
  import { ILettering } from './ILettering';
6
- import { IPartnerTransaction } from './IPartnerTransaction';
7
6
  export interface IEngagementBankTransaction {
8
7
  id?: number;
9
8
  migrate: boolean;
@@ -30,6 +29,5 @@ export interface IEngagementBankTransaction {
30
29
  accountingJournal: IAccountingJournal;
31
30
  user: IUser;
32
31
  lettering: ILettering;
33
- partnersTransaction: IPartnerTransaction;
34
32
  }
35
33
  //# sourceMappingURL=IEngagementBankTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IEngagementBankTransaction.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IEngagementBankTransaction.ts"],"names":[],"m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KAAK,CAAC;IACZ,SAAS,EAAE,UAAU,CAAC;IACtB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C"}
1
+ {"version":3,"file":"IEngagementBankTransaction.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IEngagementBankTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,WAAW,0BAA0B;IACzC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtB,WAAW,EAAE,YAAY,CAAC;IAC1B,2BAA2B,EAAE,0BAA0B,EAAE,CAAC;IAC1D,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,IAAI,EAAE,KAAK,CAAC;IACZ,SAAS,EAAE,UAAU,CAAC;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"IEngagementBankTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IEngagementBankTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { IBankAccount } from './IBankAccount';\nimport { IEngagementAccountingEntry } from './IEngagementAccountingEntry';\nimport { IAccountingJournal } from './IAccountingJournal';\nimport { IUser } from './IUser';\nimport { ILettering } from './ILettering';\nimport { IPartnerTransaction } from './IPartnerTransaction';\n\n// engagementBankTransactions\nexport interface IEngagementBankTransaction {\n id?: number;\n migrate: boolean;\n reference: string | null;\n dateValue: Date;\n dateLocked: Date | null;\n dateVerified: Date | null;\n isBlocked: boolean;\n exported: Date | null;\n noInvoice: boolean;\n isReadMobile: boolean;\n isLockedMobile: boolean;\n idBankAccount: number | null;\n idSociety: number;\n idPaymentMethod: number | null;\n idRule: number | null;\n idAccountingJournal: number;\n idLettering: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n idUser: number | null;\n\n // Associations\n bankAccount: IBankAccount;\n engagementAccountingEntries: IEngagementAccountingEntry[];\n accountingJournal: IAccountingJournal;\n user: IUser;\n lettering: ILettering;\n partnersTransaction: IPartnerTransaction;\n}\n"]}
1
+ {"version":3,"file":"IEngagementBankTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IEngagementBankTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { IBankAccount } from './IBankAccount';\nimport { IEngagementAccountingEntry } from './IEngagementAccountingEntry';\nimport { IAccountingJournal } from './IAccountingJournal';\nimport { IUser } from './IUser';\nimport { ILettering } from './ILettering';\n\n// engagementBankTransactions\nexport interface IEngagementBankTransaction {\n id?: number;\n migrate: boolean;\n reference: string | null;\n dateValue: Date;\n dateLocked: Date | null;\n dateVerified: Date | null;\n isBlocked: boolean;\n exported: Date | null;\n noInvoice: boolean;\n isReadMobile: boolean;\n isLockedMobile: boolean;\n idBankAccount: number | null;\n idSociety: number;\n idPaymentMethod: number | null;\n idRule: number | null;\n idAccountingJournal: number;\n idLettering: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n idUser: number | null;\n\n // Associations\n bankAccount: IBankAccount;\n engagementAccountingEntries: IEngagementAccountingEntry[];\n accountingJournal: IAccountingJournal;\n user: IUser;\n lettering: ILettering;\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { IAttachmentFile } from './IAttachmentFile';
2
2
  import { IFolderFile } from './IFolderFile';
3
3
  import { IFileType } from './IFileType';
4
+ import { ICommercialMail } from '../..';
4
5
  export interface IFile {
5
6
  id?: number;
6
7
  name?: string;
@@ -13,5 +14,6 @@ export interface IFile {
13
14
  attachmentFile?: IAttachmentFile;
14
15
  folderFile?: IFolderFile;
15
16
  fileType?: IFileType;
17
+ commercialMails?: ICommercialMail[];
16
18
  }
17
19
  //# sourceMappingURL=IFile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IFile.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,KAAK;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
1
+ {"version":3,"file":"IFile.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAGxC,MAAM,WAAW,KAAK;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,eAAe,EAAE,CAAA;CACpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IFile.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IFile.ts"],"names":[],"mappings":"","sourcesContent":["import { IAttachmentFile } from './IAttachmentFile';\nimport { IFolderFile } from './IFolderFile';\nimport { IFileType } from './IFileType';\n\n// files\nexport interface IFile {\n id?: number;\n name?: string;\n token?: string;\n idFolderFile: number;\n idSociety?: number | null;\n idFileType: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n attachmentFile?: IAttachmentFile;\n folderFile?: IFolderFile;\n fileType?: IFileType;\n}\n"]}
1
+ {"version":3,"file":"IFile.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IFile.ts"],"names":[],"mappings":"","sourcesContent":["import { IAttachmentFile } from './IAttachmentFile';\nimport { IFolderFile } from './IFolderFile';\nimport { IFileType } from './IFileType';\nimport { ICommercialMail } from '../..';\n\n// files\nexport interface IFile {\n id?: number;\n name?: string;\n token?: string;\n idFolderFile: number;\n idSociety?: number | null;\n idFileType: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n attachmentFile?: IAttachmentFile;\n folderFile?: IFolderFile;\n fileType?: IFileType;\n commercialMails?: ICommercialMail[]\n}\n"]}
@@ -19,6 +19,7 @@ export interface ILoan {
19
19
  idAccountBenefit: number;
20
20
  idAccountInsurance: number;
21
21
  idAccountCommission: number;
22
+ idAccountReleaseLoanCapital: number;
22
23
  createdAt?: Date | null;
23
24
  updatedAt?: Date | null;
24
25
  society?: ISociety;
@@ -27,6 +28,7 @@ export interface ILoan {
27
28
  accountBenefit?: IAccount;
28
29
  accountInsurance?: IAccount;
29
30
  accountCommission?: IAccount;
31
+ accountReleaseLoanCapital?: IAccount;
30
32
  loanFiles?: ILoanFile[];
31
33
  }
32
34
  //# sourceMappingURL=ILoan.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ILoan.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ILoan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,WAAW,KAAK;IACpB,EAAE,CAAC,EAAE,MAAM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CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,2BAA2B,EAAE,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,gBAAgB,CAAC,EAAE,QAAQ,CAAC;IAC5B,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,yBAAyB,CAAC,EAAE,QAAQ,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ILoan.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ILoan.ts"],"names":[],"mappings":"","sourcesContent":["import { ISociety } from './ISociety';\nimport { IExercice } from './IExercice';\nimport { IAccount } from './IAccount';\nimport { ILoanFile } from './ILoanFile';\n\nexport interface ILoan {\n id?: number;\n name: string;\n lenderDesignation: string;\n number: number;\n accountCount: number;\n amount: number;\n assetBeforeExercice: number;\n assetAfterExercice: number;\n monthDuration?: number;\n rate?: number;\n idExercice: number;\n idSociety: number;\n idAccountRefund: number;\n idAccountBenefit: number;\n idAccountInsurance: number;\n idAccountCommission: number;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n society?: ISociety;\n exercice?: IExercice;\n accountRefund?: IAccount;\n accountBenefit?: IAccount;\n accountInsurance?: IAccount;\n accountCommission?: IAccount;\n loanFiles?: ILoanFile[];\n}\n"]}
1
+ {"version":3,"file":"ILoan.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ILoan.ts"],"names":[],"mappings":"","sourcesContent":["import { ISociety } from './ISociety';\nimport { IExercice } from './IExercice';\nimport { IAccount } from './IAccount';\nimport { ILoanFile } from './ILoanFile';\n\nexport interface ILoan {\n id?: number;\n name: string;\n lenderDesignation: string;\n number: number;\n accountCount: number;\n amount: number;\n assetBeforeExercice: number;\n assetAfterExercice: number;\n monthDuration?: number;\n rate?: number;\n idExercice: number;\n idSociety: number;\n idAccountRefund: number;\n idAccountBenefit: number;\n idAccountInsurance: number;\n idAccountCommission: number;\n idAccountReleaseLoanCapital: number;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n society?: ISociety;\n exercice?: IExercice;\n accountRefund?: IAccount;\n accountBenefit?: IAccount;\n accountInsurance?: IAccount;\n accountCommission?: IAccount;\n accountReleaseLoanCapital?: IAccount;\n loanFiles?: ILoanFile[];\n}\n"]}
@@ -8,7 +8,6 @@ export interface IPartnerTransaction {
8
8
  idAccountingTransaction: number | null;
9
9
  createdAt?: Date | null;
10
10
  updatedAt?: Date | null;
11
- idEngagementBankTransaction: number | null;
12
11
  typePartnerTransaction?: IPartnerTransactionType;
13
12
  }
14
13
  //# sourceMappingURL=IPartnerTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IPartnerTransaction.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPartnerTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,wBAAwB,EAAE,sBAAsB,CAAC;IACjD,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3C,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;CAClD"}
1
+ {"version":3,"file":"IPartnerTransaction.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPartnerTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,wBAAwB,EAAE,sBAAsB,CAAC;IACjD,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,sBAAsB,CAAC,EAAE,uBAAuB,CAAC;CAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"IPartnerTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPartnerTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { PartnerTransactionType } from '../../Enum/PartnerTransactionType';\nimport { IPartnerTransactionType } from './IPartnerTransactionType';\n\n// partnersTransactions\nexport interface IPartnerTransaction {\n id?: number;\n tokenString: string | null;\n tokenInteger: number | null;\n idTypePartnerTransaction: PartnerTransactionType;\n idAccountingTransaction: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n idEngagementBankTransaction: number | null;\n\n // Associations\n typePartnerTransaction?: IPartnerTransactionType;\n}\n"]}
1
+ {"version":3,"file":"IPartnerTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPartnerTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { PartnerTransactionType } from '../../Enum/PartnerTransactionType';\nimport { IPartnerTransactionType } from './IPartnerTransactionType';\n\n// partnersTransactions\nexport interface IPartnerTransaction {\n id?: number;\n tokenString: string | null;\n tokenInteger: number | null;\n idTypePartnerTransaction: PartnerTransactionType;\n idAccountingTransaction: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n typePartnerTransaction?: IPartnerTransactionType;\n}\n"]}
@@ -4,12 +4,14 @@ export interface IProduct {
4
4
  id?: number;
5
5
  name: string;
6
6
  comment: string | null;
7
- isFree: boolean;
7
+ isFree?: boolean;
8
8
  codeProduct: string | null;
9
9
  priceTaxExcluded: number;
10
- idVAT: number;
10
+ idVat: number;
11
11
  unit: number | null;
12
12
  type: number | null;
13
+ amountOfPurchase: number | null;
14
+ marginVatType?: number;
13
15
  idSociety: number;
14
16
  createdAt?: Date | null;
15
17
  updatedAt?: Date | null;
@@ -1 +1 @@
1
- {"version":3,"file":"IProduct.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAA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xB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"IProduct.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IProduct.ts"],"names":[],"mappings":"","sourcesContent":["import { IVat } from './IVat';\nimport { ISociety } from './ISociety';\n\n// products\nexport interface IProduct {\n id?: number;\n name: string;\n comment: string | null;\n isFree: boolean;\n codeProduct: string | null;\n priceTaxExcluded: number;\n idVAT: number;\n unit: number | null;\n type: number | null;\n idSociety: number;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n vat?: IVat;\n society?: ISociety;\n}\n"]}
1
+ {"version":3,"file":"IProduct.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IProduct.ts"],"names":[],"mappings":"","sourcesContent":["import { IVat } from './IVat';\nimport { ISociety } from './ISociety';\n\n// products\nexport interface IProduct {\n id?: number;\n name: string;\n comment: string | null;\n isFree?: boolean;\n codeProduct: string | null;\n priceTaxExcluded: number;\n idVat: number;\n unit: number | null;\n type: number | null;\n amountOfPurchase: number | null;\n marginVatType?: number;\n idSociety: number;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n vat?: IVat;\n society?: ISociety;\n}\n"]}
@@ -6,6 +6,8 @@ export interface IProductInvoice {
6
6
  idEstimateInvoice: number;
7
7
  idProduct: number | null;
8
8
  idVat: number;
9
+ marginVatType?: number;
10
+ amountOfPurchase: number | null;
9
11
  unit: number;
10
12
  type: number;
11
13
  itemSaleName: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"IProductInvoice.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IProductInvoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QA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AAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"IProductInvoice.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IProductInvoice.ts"],"names":[],"mappings":"","sourcesContent":["import { IVat } from './IVat';\nimport { IProduct } from './IProduct';\nimport { DiscountType } from '../../Enum/CommercialManagement';\n\n// itemsEstimates\nexport interface IProductInvoice {\n id?: number;\n idEstimateInvoice: number;\n idProduct: number | null;\n idVat: number;\n unit: number;\n type: number;\n itemSaleName: string | null;\n itemCodeProduct: string | null;\n priceTaxExcluded: number;\n quantity: number;\n discount2: number | null;\n discountType: DiscountType | null;\n comment: string | null;\n reorder: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n vat?: IVat;\n product?: IProduct;\n}\n"]}
1
+ {"version":3,"file":"IProductInvoice.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IProductInvoice.ts"],"names":[],"mappings":"","sourcesContent":["import { IVat } from './IVat';\nimport { IProduct } from './IProduct';\nimport { DiscountType } from '../../Enum/CommercialManagement';\n\n// itemsEstimates\nexport interface IProductInvoice {\n id?: number;\n idEstimateInvoice: number;\n idProduct: number | null;\n idVat: number;\n marginVatType?: number;\n amountOfPurchase: number | null;\n unit: number;\n type: number;\n itemSaleName: string | null;\n itemCodeProduct: string | null;\n priceTaxExcluded: number;\n quantity: number;\n discount2: number | null;\n discountType: DiscountType | null;\n comment: string | null;\n reorder: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n vat?: IVat;\n product?: IProduct;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,8BAA8B,EAAuB,MAAM,qDAAqD,CAAC;AAE1H,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAMvE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE3E,wBAAgB,0BAA0B,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,OAAO,EAAE,qBAAqB,GAAG,qBAAqB,GAAG,8BAA8B,CAkD7K;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,GAAG,8BAA8B,CAuCtG"}
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,8BAA8B,EAAuB,MAAM,qDAAqD,CAAC;AAE1H,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAOvE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE3E,wBAAgB,0BAA0B,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,OAAO,EAAE,qBAAqB,GAAG,qBAAqB,GAAG,8BAA8B,CAmD7K;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,qBAAqB,GAAG,8BAA8B,CAyCtG"}
@@ -1,8 +1,9 @@
1
1
  import * as ejs from 'ejs';
2
- import { orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy } from 'lodash';
2
+ import { orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq, } from 'lodash';
3
3
  import * as dayjs from 'dayjs';
4
- import { fontList } from '../../types/Enum/CommercialManagement';
4
+ import { fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';
5
5
  import { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';
6
+ import { Vat } from '../../types/Enum/Vat';
6
7
  import { integerToFormattedAmountString } from '../amount';
7
8
  import { CommercialDocumentCommonHTML } from './templates/common';
8
9
  import { bodyTemplate } from './templates/body';
@@ -11,13 +12,14 @@ import { vatToReadVatEditing } from './vat';
11
12
  export function generateCommercialDocument(idEstimateInvoiceType, payload) {
12
13
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
13
14
  const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));
14
- // FIXME: Par quoi regrouper ceux qui ont un nom ""
15
- const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value'));
15
+ const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);
16
16
  const data = Object.assign(Object.assign({}, payload), { paymentLink: (_a = payload.paymentLink) !== null && _a !== void 0 ? _a : '#', idEstimateInvoiceType, phoneContact: (_c = (_b = payload.settings) === null || _b === void 0 ? void 0 : _b.phoneContact) !== null && _c !== void 0 ? _c : null, products,
17
17
  vats, totalTaxExcluded: _sumBy(products, 'totalTaxExcluded'), totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount'), totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_d = payload.generalDiscount2) !== null && _d !== void 0 ? _d : 0), generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null, depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null, totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded')), totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_e = payload.deposit) !== null && _e !== void 0 ? _e : 0)), totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_f = payload.generalDiscount2) !== null && _f !== void 0 ? _f : 0) - ((_g = payload.deposit) !== null && _g !== void 0 ? _g : 0)), totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')), font: {
18
18
  name: (_j = (_h = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _h === void 0 ? void 0 : _h.name) !== null && _j !== void 0 ? _j : fontList[0].name,
19
19
  url: (_l = (_k = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _k === void 0 ? void 0 : _k.link) !== null && _l !== void 0 ? _l : fontList[0].link,
20
- }, capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null, dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null, expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null, emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null, shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0) });
20
+ }, capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null, dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null, expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null, emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null, shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),
21
+ // @ts-ignore
22
+ marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)) });
21
23
  const commonTemplate = new CommercialDocumentCommonHTML();
22
24
  let documentFreeText;
23
25
  // A GERER EN FONCTION DU DOCUMENT
@@ -36,18 +38,20 @@ export function generateCommercialDocument(idEstimateInvoiceType, payload) {
36
38
  };
37
39
  }
38
40
  export function generateAdvanceDocument(payload) {
39
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
40
42
  if (!payload.deposit)
41
43
  throw new Error('Aucun acompte défini');
42
44
  const data = Object.assign(Object.assign({}, payload), { paymentLink: (_a = payload.paymentLink) !== null && _a !== void 0 ? _a : '#', idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE, phoneContact: (_c = (_b = payload.settings) === null || _b === void 0 ? void 0 : _b.phoneContact) !== null && _c !== void 0 ? _c : null, products: [], vats: [], totalTaxExcluded: payload.deposit, totalTaxIncluded: payload.deposit, totalTaxAndDiscountIncluded: payload.deposit, generalDiscountFormatted: null, depositFormatted: integerToFormattedAmountString(payload.deposit), totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit), totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit), totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit), totalVatAmountFormatted: integerToFormattedAmountString(0), font: {
43
45
  name: (_e = (_d = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : fontList[0].name,
44
46
  url: (_g = (_f = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _f === void 0 ? void 0 : _f.link) !== null && _g !== void 0 ? _g : fontList[0].link,
45
- }, capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null, dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null, expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null, emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null, shouldDisplayDiscountColumn: false, disableVat: true });
47
+ }, capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null, dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null, expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null, emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null, shouldDisplayDiscountColumn: false, disableVat: true,
48
+ // @ts-ignore
49
+ marginVats: _uniq(((_h = payload.assetMarginVatIds) !== null && _h !== void 0 ? _h : []).map((m) => { var _a, _b; return (_b = (_a = VatMarginCategyList.find((c) => c.id === m)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : null; })) });
46
50
  const commonTemplate = new CommercialDocumentCommonHTML();
47
51
  return {
48
52
  header: ejs.render(commonTemplate.header, data),
49
53
  body: ejs.render(bodyTemplate, data),
50
- footer: ejs.render(commonTemplate.footer, Object.assign(Object.assign({}, data), { freeText: (_j = (_h = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _h === void 0 ? void 0 : _h.freeInvoiceText) !== null && _j !== void 0 ? _j : null })),
54
+ footer: ejs.render(commonTemplate.footer, Object.assign(Object.assign({}, data), { freeText: (_k = (_j = payload === null || payload === void 0 ? void 0 : payload.settings) === null || _j === void 0 ? void 0 : _j.freeInvoiceText) !== null && _k !== void 0 ? _k : null })),
51
55
  data,
52
56
  };
53
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AACnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,UAAU,0BAA0B,CAAC,qBAA0C,EAAE,OAAsD;;IAC3I,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,2BAA2B,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IAC9G,mDAAmD;IACnD,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC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EAAE,IAAI,CAAC;QACpC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,kCAAO,IAAI,KAAE,QAAQ,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,eAAe,mCAAI,IAAI,IAAG;QAC5G,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import * as ejs from 'ejs';\nimport { orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy } from 'lodash';\nimport * as dayjs from 'dayjs';\nimport { ReadCommercialDocumentTemplate, ReadDocumentEditing } from '../../types/Interface/api/commercialManagement/Read';\nimport { fontList } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { integerToFormattedAmountString } from '../amount';\nimport { CommercialDocumentCommonHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport { CreateInvoiceDocument, CreatePreSaleDocument } from '../../types';\n\nexport function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoiceType, payload: CreateInvoiceDocument | CreatePreSaleDocument): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n // FIXME: Par quoi regrouper ceux qui ont un nom \"\"\n const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value'));\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded'),\n totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount'),\n totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0),\n generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded')),\n totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.deposit ?? 0)),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0)),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n let documentFreeText: string | null | undefined;\n\n // A GERER EN FONCTION DU DOCUMENT\n if ([EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType)) {\n documentFreeText = payload?.settings?.freeEstimateText;\n } else {\n documentFreeText = payload?.settings?.freeInvoiceText;\n }\n //\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: documentFreeText ?? null }),\n data,\n };\n}\n\nexport function generateAdvanceDocument(payload: CreateInvoiceDocument): ReadCommercialDocumentTemplate {\n if (!payload.deposit) throw new Error('Aucun acompte défini');\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE,\n phoneContact: payload.settings?.phoneContact ?? null,\n products: [],\n vats: [],\n totalTaxExcluded: payload.deposit,\n totalTaxIncluded: payload.deposit,\n totalTaxAndDiscountIncluded: payload.deposit,\n generalDiscountFormatted: null,\n depositFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalVatAmountFormatted: integerToFormattedAmountString(0),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: false,\n disableVat: true,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: payload?.settings?.freeInvoiceText ?? null }),\n data,\n };\n}"]}
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,G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AAE,EAAE,eAAC,OAAA,MAAA,MAAA,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,0CAAE,KAAK,mCAAI,IAAI,CAAA,EAAA,CAAC,CAAC,GAC5H,CAAC;IAEF,MAAM,cAAc,GAAG,IAAI,4BAA4B,EAAE,CAAC;IAE1D,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC;QAC/C,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC;QACpC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,kCAAO,IAAI,KAAE,QAAQ,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,eAAe,mCAAI,IAAI,IAAG;QAC5G,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import * as ejs from 'ejs';\nimport {\n orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq,\n} from 'lodash';\nimport * as dayjs from 'dayjs';\nimport { ReadCommercialDocumentTemplate, ReadDocumentEditing } from '../../types/Interface/api/commercialManagement/Read';\nimport { fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { Vat } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString } from '../amount';\nimport { CommercialDocumentCommonHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport { CreateInvoiceDocument, CreatePreSaleDocument } from '../../types';\n\nexport function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoiceType, payload: CreateInvoiceDocument | CreatePreSaleDocument): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded'),\n totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount'),\n totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0),\n generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded')),\n totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.deposit ?? 0)),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0)),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n // @ts-ignore\n marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n let documentFreeText: string | null | undefined;\n\n // A GERER EN FONCTION DU DOCUMENT\n if ([EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType)) {\n documentFreeText = payload?.settings?.freeEstimateText;\n } else {\n documentFreeText = payload?.settings?.freeInvoiceText;\n }\n //\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: documentFreeText ?? null }),\n data,\n };\n}\n\nexport function generateAdvanceDocument(payload: CreateInvoiceDocument): ReadCommercialDocumentTemplate {\n if (!payload.deposit) throw new Error('Aucun acompte défini');\n\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE,\n phoneContact: payload.settings?.phoneContact ?? null,\n products: [],\n vats: [],\n totalTaxExcluded: payload.deposit,\n totalTaxIncluded: payload.deposit,\n totalTaxAndDiscountIncluded: payload.deposit,\n generalDiscountFormatted: null,\n depositFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalVatAmountFormatted: integerToFormattedAmountString(0),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: false,\n disableVat: true,\n // @ts-ignore\n marginVats: _uniq((payload.assetMarginVatIds ?? []).map((m) => VatMarginCategyList.find((c) => c.id === m)?.label ?? null)),\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: payload?.settings?.freeInvoiceText ?? null }),\n data,\n };\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/product.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMlE,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAU5D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAGpE;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,eAAe,GAAG,kBAAkB,CAWxF"}
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/product.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAMlE,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAU5D;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAGpE;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,eAAe,GAAG,kBAAkB,CAYxF"}
@@ -1,6 +1,6 @@
1
1
  import { isDefined } from 'class-validator';
2
2
  import { Unit } from '../../types/Enum/Unit';
3
- import { DiscountType } from '../../types/Enum/CommercialManagement';
3
+ import { DiscountType, VatMarginCategyList } from '../../types/Enum/CommercialManagement';
4
4
  import { getById } from './vat';
5
5
  import { integerToFormattedAmountString } from '../amount';
6
6
  export function getDiscount(product) {
@@ -21,7 +21,7 @@ export function getTotalTaxExcluded(product) {
21
21
  return ((_a = product.priceTaxExcluded) !== null && _a !== void 0 ? _a : 0) * ((_b = product.quantity) !== null && _b !== void 0 ? _b : 1) - (discount * ((_c = product.quantity) !== null && _c !== void 0 ? _c : 1));
22
22
  }
23
23
  export function productToReadProductEditing(payload) {
24
- var _a, _b, _c, _d;
25
- return Object.assign(Object.assign({}, payload), { totalTaxExcluded: getTotalTaxExcluded(payload), unitFormatted: (_b = (_a = Object.values(Unit).find((unit) => unit.id === payload.unit)) === null || _a === void 0 ? void 0 : _a.shortName) !== null && _b !== void 0 ? _b : '', vatFormatted: (_d = (_c = getById(payload.idVat)) === null || _c === void 0 ? void 0 : _c.saleName) !== null && _d !== void 0 ? _d : '', priceTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(payload.priceTaxExcluded) : null, totalTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(getTotalTaxExcluded(payload)) : null, discountFormatted: payload.discount2 && payload.discount2 > 0 ? integerToFormattedAmountString(getDiscount(payload)) : null, discountTypeFormatted: payload.discount2 && payload.discount2 > 0 ? payload.discountType === DiscountType.PERCENT ? `${(payload.discount2 / 100).toFixed(2)}%` : `${integerToFormattedAmountString(payload.discount2)}€` : null });
24
+ var _a, _b, _c, _d, _e, _f;
25
+ return Object.assign(Object.assign({}, payload), { totalTaxExcluded: getTotalTaxExcluded(payload), unitFormatted: (_b = (_a = Object.values(Unit).find((unit) => unit.id === payload.unit)) === null || _a === void 0 ? void 0 : _a.shortName) !== null && _b !== void 0 ? _b : '', vatFormatted: (_d = (_c = getById(payload.idVat)) === null || _c === void 0 ? void 0 : _c.saleName) !== null && _d !== void 0 ? _d : '', priceTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(payload.priceTaxExcluded) : null, totalTaxExcludedFormatted: isDefined(payload.priceTaxExcluded) ? integerToFormattedAmountString(getTotalTaxExcluded(payload)) : null, discountFormatted: payload.discount2 && payload.discount2 > 0 ? integerToFormattedAmountString(getDiscount(payload)) : null, discountTypeFormatted: payload.discount2 && payload.discount2 > 0 ? payload.discountType === DiscountType.PERCENT ? `${(payload.discount2 / 100).toFixed(2)}%` : `${integerToFormattedAmountString(payload.discount2)}€` : null, marginVatFormatted: payload.marginVatType ? (_f = (_e = VatMarginCategyList.find((c) => c.id === payload.marginVatType)) === null || _e === void 0 ? void 0 : _e.label) !== null && _f !== void 0 ? _f : null : null });
26
26
  }
27
27
  //# sourceMappingURL=product.js.map