@silexpert/core 1.1.142 → 1.1.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/resources/Das.d.ts +1 -1
- package/dist/cjs/api/resources/Das.d.ts.map +1 -1
- package/dist/cjs/api/resources/Das.js.map +1 -1
- package/dist/cjs/api/resources/Registration.d.ts +4 -0
- package/dist/cjs/api/resources/Registration.d.ts.map +1 -1
- package/dist/cjs/api/resources/Registration.js +9 -0
- package/dist/cjs/api/resources/Registration.js.map +1 -1
- package/dist/cjs/api/resources/Vat.d.ts +0 -3
- package/dist/cjs/api/resources/Vat.d.ts.map +1 -1
- package/dist/cjs/api/resources/Vat.js +0 -6
- package/dist/cjs/api/resources/Vat.js.map +1 -1
- package/dist/cjs/api/resources.d.ts +2 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +2 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/FolderFile.d.ts +6 -0
- package/dist/cjs/types/Enum/FolderFile.d.ts.map +1 -1
- package/dist/cjs/types/Enum/FolderFile.js +6 -0
- package/dist/cjs/types/Enum/FolderFile.js.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +1 -1
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Interface/api/cerfa/das2.d.ts +0 -3
- package/dist/cjs/types/Interface/api/cerfa/das2.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/cerfa/das2.js +1 -9
- package/dist/cjs/types/Interface/api/cerfa/das2.js.map +1 -1
- package/dist/cjs/types/Interface/api/jeDeclare/ReadJeDeclare.d.ts +4 -2
- package/dist/cjs/types/Interface/api/jeDeclare/ReadJeDeclare.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/jeDeclare/ReadJeDeclare.js.map +1 -1
- package/dist/cjs/types/Interface/api/jeDeclare/Util.d.ts +1 -0
- package/dist/cjs/types/Interface/api/jeDeclare/Util.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/jeDeclare/Util.js.map +1 -1
- package/dist/cjs/utils/vat/registration.js +11 -11
- package/dist/cjs/utils/vat/registration.js.map +1 -1
- package/dist/mjs/api/resources/Das.d.ts +1 -1
- package/dist/mjs/api/resources/Das.d.ts.map +1 -1
- package/dist/mjs/api/resources/Das.js.map +1 -1
- package/dist/mjs/api/resources/Registration.d.ts +4 -0
- package/dist/mjs/api/resources/Registration.d.ts.map +1 -1
- package/dist/mjs/api/resources/Registration.js +9 -0
- package/dist/mjs/api/resources/Registration.js.map +1 -1
- package/dist/mjs/api/resources/Vat.d.ts +0 -3
- package/dist/mjs/api/resources/Vat.d.ts.map +1 -1
- package/dist/mjs/api/resources/Vat.js +0 -6
- package/dist/mjs/api/resources/Vat.js.map +1 -1
- package/dist/mjs/api/resources.d.ts +2 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +2 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/FolderFile.d.ts +6 -0
- package/dist/mjs/types/Enum/FolderFile.d.ts.map +1 -1
- package/dist/mjs/types/Enum/FolderFile.js +6 -0
- package/dist/mjs/types/Enum/FolderFile.js.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +1 -1
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Interface/api/cerfa/das2.d.ts +0 -3
- package/dist/mjs/types/Interface/api/cerfa/das2.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/cerfa/das2.js +1 -9
- package/dist/mjs/types/Interface/api/cerfa/das2.js.map +1 -1
- package/dist/mjs/types/Interface/api/jeDeclare/ReadJeDeclare.d.ts +4 -2
- package/dist/mjs/types/Interface/api/jeDeclare/ReadJeDeclare.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/jeDeclare/ReadJeDeclare.js.map +1 -1
- package/dist/mjs/types/Interface/api/jeDeclare/Util.d.ts +1 -0
- package/dist/mjs/types/Interface/api/jeDeclare/Util.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/jeDeclare/Util.js.map +1 -1
- package/dist/mjs/utils/vat/registration.js +1 -1
- package/dist/mjs/utils/vat/registration.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Das.ts +1 -1
- package/ts/api/resources/Registration.ts +12 -0
- package/ts/api/resources/Vat.ts +1 -7
- package/ts/api/resources.ts +3 -1
- package/ts/types/Enum/FolderFile.ts +6 -0
- package/ts/types/Enum/PrestationType.ts +1 -1
- package/ts/types/Interface/api/cerfa/das2.ts +1 -7
- package/ts/types/Interface/api/jeDeclare/ReadJeDeclare.ts +4 -2
- package/ts/types/Interface/api/jeDeclare/Util.ts +1 -0
- package/ts/utils/vat/registration.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"das2.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/cerfa/das2.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,+BAA+B,EAAE,CAAC;IACzC,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC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,CAAC;SACtB,CAAA;QACD,OAAO,EAAE;YACP,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;YACzB,KAAK,EAAE;gBACL,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;gBACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;aACtB,CAAA;YACD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;YACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;SACtB,CAAA;KACF,CAAA;IACD,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,QAAQ,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;KAAE,CAAA;IAC/D,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAA;CACF;AAED,qBAAa,mBAAmB;IAG5B,SAAS,EAAE,MAAM,CAAC;IAIlB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,sBAAsB;IAK/B,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,qBAAa,qBAAqB;IAG9B,YAAY,EAAE,cAAc,EAAE,CAAC;IAM/B,aAAa,CAAC,EAAE,OAAO,CAAC;IAIxB,SAAS,EAAE,MAAM,CAAC;IAIlB,OAAO,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -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 { IsArray, IsBoolean, IsDateString,
|
|
10
|
+
import { IsArray, IsBoolean, IsDateString, IsOptional } from 'class-validator';
|
|
11
11
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
12
12
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
13
13
|
export class QueryDasTransaction {
|
|
@@ -62,12 +62,4 @@ __decorate([
|
|
|
62
62
|
IsDateString(),
|
|
63
63
|
__metadata("design:type", String)
|
|
64
64
|
], CreateDasRegistration.prototype, "endDate", void 0);
|
|
65
|
-
export class QueryDasPreview {
|
|
66
|
-
payload;
|
|
67
|
-
}
|
|
68
|
-
__decorate([
|
|
69
|
-
ApiProperty(),
|
|
70
|
-
IsObject(),
|
|
71
|
-
__metadata("design:type", Object)
|
|
72
|
-
], QueryDasPreview.prototype, "payload", void 0);
|
|
73
65
|
//# sourceMappingURL=das2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"das2.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/cerfa/das2.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"das2.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/cerfa/das2.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAgG3E,MAAM,OAAO,mBAAmB;IAG5B,SAAS,CAAS;IAIlB,OAAO,CAAS;CACnB;AAPC;IAAC,WAAW,EAAE;IACb,YAAY,EAAE;;sDACK;AAEpB;IAAC,WAAW,EAAE;IACb,YAAY,EAAE;;oDACG;AAGpB,MAAM,OAAO,sBAAsB;IAK/B,UAAU,CAAW;CACxB;AALC;IAAC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,SAAS,EAAE;IACX,SAAS,EAAE;;0DACW;AAGzB,MAAM,OAAO,qBAAqB;IAG9B,YAAY,CAAmB;IAM/B,aAAa,CAAW;IAIxB,SAAS,CAAS;IAIlB,OAAO,CAAS;CACnB;AAjBC;IAAC,WAAW,EAAE;IACb,OAAO,EAAE;;2DACuB;AAEjC;IAAC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;4DACa;AAE1B;IAAC,WAAW,EAAE;IACb,YAAY,EAAE;;wDACK;AAEpB;IAAC,WAAW,EAAE;IACb,YAAY,EAAE;;sDACG","sourcesContent":["import { IsArray, IsBoolean, IsDateString, IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { DasNature } from '../../../Enum/Das';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\n\nexport interface Das2ThirdPartyPersonnalizedData {\n amount: number;\n nature: DasNature;\n}\n\nexport interface Das2ThirdParty {\n totalTaxIncluded: number;\n fullnameOrCompany: string;\n address: {\n number: string | null;\n street: string | null;\n zipCode: string | null;\n city: string | null;\n };\n legalForm: number;\n siret: string | null;\n other: Das2ThirdPartyPersonnalizedData[];\n nature: {\n value: number;\n food: number;\n };\n indemnities: {\n amount: number;\n letter: string | null;\n };\n vat: number[];\n source: {\n amount: number;\n letter: string | null;\n }\n\n // Déterminé automatiquement\n isPhysical?: boolean;\n firstname?: string | null;\n lastname?: string | null;\n occupation?: string | null;\n inseeNumber?: string | null;\n distributor?: string | null;\n name?: string | null;\n}\nexport interface Das2PdfForm {\n header: {\n firstname: string | null;\n siret: string | null;\n apeCode: string | null;\n name: string | null;\n endDate: {\n day: string | null;\n month: string | null;\n };\n activity: string | null;\n address: {\n complement: string | null;\n number: string | null;\n street: string | null;\n zipCode: string | null;\n city: string | null;\n insee: string | null;\n distributor: string | null;\n };\n establishment: {\n name: string | null;\n address: {\n number: string | null;\n street: string | null;\n zipCode: string | null;\n city: string | null;\n }\n };\n sign: {\n date: string | null;\n place: string | null;\n }\n contact: {\n firstname: string | null;\n email: {\n part2: string | null;\n part1: string | null;\n }\n lastname: string | null;\n phone: string | null;\n }\n }\n thirdParties: Das2ThirdParty[];\n exercice: { startDate: string; endDate: string; year: string; }\n total: {\n case4: number;\n case5: number;\n case6: number;\n case7: number;\n case9: number;\n }\n}\n\nexport class QueryDasTransaction {\n @ApiProperty()\n @IsDateString()\n startDate: string;\n\n @ApiProperty()\n @IsDateString()\n endDate: string;\n}\n\nexport class DeclareDasRegistration {\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isTestMode?: boolean;\n}\n\nexport class CreateDasRegistration {\n @ApiProperty()\n @IsArray()\n thirdParties: Das2ThirdParty[];\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isTestingMode?: boolean;\n\n @ApiProperty()\n @IsDateString()\n startDate: string;\n \n @ApiProperty()\n @IsDateString()\n endDate: string;\n}"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { IAccountingTransaction } from '../../..';
|
|
2
|
-
export type ReadJeDeclareImport = {
|
|
2
|
+
export type ReadJeDeclareImport = Array<{
|
|
3
|
+
access: string;
|
|
3
4
|
transactions: IAccountingTransaction[];
|
|
4
5
|
missingIbans: string[];
|
|
5
|
-
|
|
6
|
+
errors: any[];
|
|
7
|
+
}>;
|
|
6
8
|
//# sourceMappingURL=ReadJeDeclare.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadJeDeclare.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/jeDeclare/ReadJeDeclare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG;
|
|
1
|
+
{"version":3,"file":"ReadJeDeclare.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/jeDeclare/ReadJeDeclare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,sBAAsB,EAAE,CAAC;IACvC,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,MAAM,EAAE,GAAG,EAAE,CAAA;CACd,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadJeDeclare.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/jeDeclare/ReadJeDeclare.ts"],"names":[],"mappings":"","sourcesContent":["import { IAccountingTransaction } from '../../..';\n\nexport type ReadJeDeclareImport = {\n transactions: IAccountingTransaction[];\n missingIbans: string[]\n}
|
|
1
|
+
{"version":3,"file":"ReadJeDeclare.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/jeDeclare/ReadJeDeclare.ts"],"names":[],"mappings":"","sourcesContent":["import { IAccountingTransaction } from '../../..';\n\nexport type ReadJeDeclareImport = Array<{\n access: string;\n transactions: IAccountingTransaction[];\n missingIbans: string[]\n errors: any[]\n}>;"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Util.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/jeDeclare/Util.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG;IACnB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,M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8BAA8B,EAAE,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/jeDeclare/Util.ts"],"names":[],"mappings":"","sourcesContent":["type WSDLJeDeClare = {\n url: string;\n};\n\nexport type AccessKeysJeDeclare = {\n login: string;\n password: string;\n editor: string;\n software: string;\n wsdl: WSDLJeDeClare;\n};\n\nexport type GetDocumentParams = {\n itemStatus: string;\n procedureType: string;\n listType: string;\n forceTestMode?: boolean;\n};\n\nexport type ListDocumentAvailability = DocumentAvailability[];\n\nexport type DocumentAvailability = {\n 'ns2:numero': string[];\n 'ns2:statut': string[];\n 'ns2:typeDePiece': string[];\n};\n\nexport type BankStatementCFONBStructure = {\n previous: { [key: string]: string | null } | null;\n transactions: LineStructure[];\n last: { [key: string]: string | null } | null;\n};\n\nexport type LineStructureUnknowProperty = { [key: string]: string | null } | null;\nexport type LineStructure = LineStructureUnknowProperty & {\n detail: { [key: string]: string | null } | null;\n};\n\nexport type AmountType = 'credit' | 'debit' | 'neutral' | 'unknown';\n\ntype UsableBankStatementTransaction = {\n dateValue?: string;\n id?: number;\n label: string | null;\n debit: number;\n credit: number;\n idCurrency: number | null;\n complementaryLabel: string | null;\n};\n\ntype BankStatementData = {\n balance: number;\n dateBalance: string;\n};\n\nexport type UsableBankStatement = {\n iban: string | null;\n previous: BankStatementData;\n next: BankStatementData;\n name: string | null;\n transactions: UsableBankStatementTransaction[];\n};\n\nexport type GetDocumentsParams = {\n itemStatus: string;\n procedureType: string;\n listType: string;\n forceTestMode?: boolean;\n};"]}
|
|
1
|
+
{"version":3,"file":"Util.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/jeDeclare/Util.ts"],"names":[],"mappings":"","sourcesContent":["type WSDLJeDeClare = {\n url: string;\n};\n\nexport type AccessKeysJeDeclare = {\n login: string;\n password: string;\n editor: string;\n software: string;\n wsdl: WSDLJeDeClare;\n};\n\nexport type GetDocumentParams = {\n itemStatus: string;\n procedureType: string;\n listType: string;\n forceTestMode?: boolean;\n};\n\nexport type ListDocumentAvailability = DocumentAvailability[];\n\nexport type DocumentAvailability = {\n 'ns2:numero': string[];\n 'ns2:statut': string[];\n 'ns2:typeDePiece': string[];\n};\n\nexport type BankStatementCFONBStructure = {\n previous: { [key: string]: string | null } | null;\n transactions: LineStructure[];\n last: { [key: string]: string | null } | null;\n};\n\nexport type LineStructureUnknowProperty = { [key: string]: string | null } | null;\nexport type LineStructure = LineStructureUnknowProperty & {\n detail: { [key: string]: string | null } | null;\n};\n\nexport type AmountType = 'credit' | 'debit' | 'neutral' | 'unknown';\n\ntype UsableBankStatementTransaction = {\n dateValue?: string;\n id?: number;\n label: string | null;\n debit: number;\n credit: number;\n idCurrency: number | null;\n complementaryLabel: string | null;\n};\n\ntype BankStatementData = {\n balance: number;\n dateBalance: string;\n};\n\nexport type UsableBankStatement = {\n iban: string | null;\n previous: BankStatementData;\n next: BankStatementData;\n name: string | null;\n transactions: UsableBankStatementTransaction[];\n};\n\nexport type GetDocumentsParams = {\n itemStatus: string;\n procedureType: string;\n listType: string;\n forceTestMode?: boolean;\n accessName: string;\n};"]}
|
|
@@ -103,7 +103,7 @@ export function getTicks(registration) {
|
|
|
103
103
|
export function getTypeAndAmountFromRegistration(registration) {
|
|
104
104
|
if (registration.idCerfaType === CerfaType.CERFA_3310) {
|
|
105
105
|
const payload = registration.payload.cerfa3310;
|
|
106
|
-
const other = { collectable: payload.vat
|
|
106
|
+
const other = { collectable: payload.vat?.grossDue, deductible: payload.vat?.deductible.total };
|
|
107
107
|
if (payload?.isNil)
|
|
108
108
|
return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };
|
|
109
109
|
if (payload?.toPay?.total > 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration.js","sourceRoot":"","sources":["../../../../ts/utils/vat/registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAGL,SAAS,EACT,eAAe,EAIyB,iBAAiB,EAAE,qBAAqB,GACjF,MAAM,aAAa,CAAC;AAGrB,MAAM,YAAY,GAAyB;IACzC,KAAK,EAAE,qBAAqB,CAAC,WAAW;IACxC,KAAK,EAAE,wBAAwB;IAC/B,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,UAAU,QAAQ,CAAC,YAA8B;IACrD,MAAM,YAAY,GAA2B,YAAY,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC;IACvF,MAAM,OAAO,GAA0B,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;IAEtE,IAAI,YAAY,CAAC,KAAK,KAAK,iBAAiB,CAAC,WAAW,EAAE;QACxD,MAAM,IAAI,GAA6B,EAAE,CAAC;QAE1C,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;YACnC,MAAM,MAAM,GAAG;gBACb;oBACE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,SAAS,CAAC,WAAW,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,EAAE,IAAI,MAAM,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI;oBAC7J,KAAK,EAAE,qBAAqB,CAAC,QAAQ;oBACrC,KAAK,EAAE,qBAAqB;oBAC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EAAE,cAAc,EAAE,cAAc,IAAI,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,CAAC;QAChP,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;KAClE;IAED,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse } from 'lodash';\nimport {\n Cerfa3310_2023,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration, ReadRegistrationTick, RegistrationState, RegistrationTickState,\n} from '../../types';\nimport { Cerfa3517_2023 } from '../../types/Interface/api/cerfa/3517';\n\nconst waitingState: ReadRegistrationTick = {\n state: RegistrationTickState.IN_PROGRESS,\n title: 'En cours de traitement',\n details: [],\n date: null,\n isPayment: false,\n};\n\nexport function getTicks(registration: ReadRegistration): ReadRegistrationTick[][] {\n const declarations: Array<ReadDeclaration> = registration.response?.declarations ?? [];\n const history : InterchangeHistory[] = registration.response?.history;\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach((declaration) => {\n const result = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n details: [],\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n isPayment: false,\n },\n waitingState,\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n result.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(result);\n });\n\n return data;\n } if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n\n if (!declarations.length) {\n const response: ReadRegistrationTick[] = [\n {\n type: null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n {\n state: RegistrationTickState.FAILED,\n title: history?.find((h) => h.isError)?.label ?? '',\n details: history?.find((h) => h.isError)?.stateDetailsHistory ?? [],\n date: history?.find((h) => h.isError)?.date ?? null,\n },\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n response.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(response);\n }\n\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n ...reverse(declaration.states).map((d: InterchangeHistory) => ({\n state: d.isError ? RegistrationTickState.FAILED : RegistrationTickState.FINISHED,\n title: d.label ?? null,\n details: d?.stateDetailsHistory,\n date: d.date ?? null,\n })),\n ];\n\n for (let index = declaration.states.length; index < 3; index += 1) {\n response.push({ ...waitingState, title: null });\n }\n\n if (isDefined(declaration.payment)) {\n response.push({\n state: declaration.payment.isError ? RegistrationTickState.FAILED : declaration.payment.isError === null ? RegistrationTickState.IN_PROGRESS : RegistrationTickState.FINISHED,\n title: declaration.payment?.label ?? '',\n details: [],\n isPayment: true,\n date: declaration.payment.date ?? null,\n });\n }\n data.push(response);\n });\n\n return data;\n }\n\n return [];\n}\n\nexport function getTypeAndAmountFromRegistration(registration: IRegistration): { type: CustomerVatType | null; amount: number | null; collectable: number; deductible: number; } {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as Cerfa3310_2023;\n const other = { collectable: payload.vat.grossDue, deductible: payload.vat.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };\n if (payload?.credit?.refundAsked > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3514) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests) return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as Cerfa3517_2023;\n const other = { collectable: payload.other.total, deductible: payload.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n\n return {\n type: null, amount: null, collectable: 0, de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G,KAAK,EAAE,CAAC;QAChP,OAAO,EAAE,IAAI,EAAE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;KAClE;IAED,OAAO;QACL,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { isDefined } from 'class-validator';\nimport { reverse } from 'lodash';\nimport {\n Cerfa3310_2023,\n Cerfa3514_2022,\n CerfaType,\n CustomerVatType,\n IRegistration,\n InterchangeHistory,\n ReadDeclaration,\n ReadRegistration, ReadRegistrationTick, RegistrationState, RegistrationTickState,\n} from '../../types';\nimport { Cerfa3517_2023 } from '../../types/Interface/api/cerfa/3517';\n\nconst waitingState: ReadRegistrationTick = {\n state: RegistrationTickState.IN_PROGRESS,\n title: 'En cours de traitement',\n details: [],\n date: null,\n isPayment: false,\n};\n\nexport function getTicks(registration: ReadRegistration): ReadRegistrationTick[][] {\n const declarations: Array<ReadDeclaration> = registration.response?.declarations ?? [];\n const history : InterchangeHistory[] = registration.response?.history;\n\n if (registration.state === RegistrationState.IN_PROGRESS) {\n const data: ReadRegistrationTick[][] = [];\n\n declarations.forEach((declaration) => {\n const result = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n details: [],\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n isPayment: false,\n },\n waitingState,\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n result.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(result);\n });\n\n return data;\n } if ([RegistrationState.ACCEPTED, RegistrationState.REFUSED].includes(registration.state)) {\n const data: ReadRegistrationTick[][] = [];\n\n if (!declarations.length) {\n const response: ReadRegistrationTick[] = [\n {\n type: null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n {\n state: RegistrationTickState.FAILED,\n title: history?.find((h) => h.isError)?.label ?? '',\n details: history?.find((h) => h.isError)?.stateDetailsHistory ?? [],\n date: history?.find((h) => h.isError)?.date ?? null,\n },\n waitingState,\n waitingState,\n ];\n\n if (registration.amountToPay && registration.amountToPay > 0) {\n response.push({\n ...waitingState,\n isPayment: true,\n });\n }\n\n data.push(response);\n }\n\n declarations.forEach((declaration) => {\n const response: ReadRegistrationTick[] = [\n {\n type: isDefined(declaration?.type) && isDefined(declaration?.declarationType?.label) ? `${declaration?.type} - ${declaration?.declarationType?.label}` : null,\n state: RegistrationTickState.FINISHED,\n title: 'Déclaration envoyée',\n date: registration.sendAt ? dayjs(registration.sendAt).toISOString() : null,\n details: [],\n },\n ...reverse(declaration.states).map((d: InterchangeHistory) => ({\n state: d.isError ? RegistrationTickState.FAILED : RegistrationTickState.FINISHED,\n title: d.label ?? null,\n details: d?.stateDetailsHistory,\n date: d.date ?? null,\n })),\n ];\n\n for (let index = declaration.states.length; index < 3; index += 1) {\n response.push({ ...waitingState, title: null });\n }\n\n if (isDefined(declaration.payment)) {\n response.push({\n state: declaration.payment.isError ? RegistrationTickState.FAILED : declaration.payment.isError === null ? RegistrationTickState.IN_PROGRESS : RegistrationTickState.FINISHED,\n title: declaration.payment?.label ?? '',\n details: [],\n isPayment: true,\n date: declaration.payment.date ?? null,\n });\n }\n data.push(response);\n });\n\n return data;\n }\n\n return [];\n}\n\nexport function getTypeAndAmountFromRegistration(registration: IRegistration): { type: CustomerVatType | null; amount: number | null; collectable: number; deductible: number; } {\n if (registration.idCerfaType === CerfaType.CERFA_3310) {\n const payload = registration.payload.cerfa3310 as Cerfa3310_2023;\n const other = { collectable: payload.vat?.grossDue, deductible: payload.vat?.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };\n if (payload?.credit?.refundAsked > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };\n if (payload?.credit?.toReport > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload.credit.toReport, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3514) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const payload = registration.payload.cerfa3514 as Cerfa3514_2022;\n const other = { collectable: payload.vatAmountCollected, deductible: payload.vatAmountDeductible };\n if (payload?.vatAmountToPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.vatAmountToPay, ...other };\n if (payload?.vatRefundedOnInvests) return { type: CustomerVatType.VAT_REFUND, amount: payload.vatRefundedOnInvests, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n } if (registration.idCerfaType === CerfaType.CERFA_3517) {\n const payload = registration.payload.cerfa3517 as Cerfa3517_2023;\n const other = { collectable: payload.other.total, deductible: payload.deductible.total };\n if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };\n if (payload?.recapitulation?.toPay > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload?.recapitulation?.toPay, ...other };\n if (payload?.recapitulation?.refund > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload?.recapitulation?.refund, ...other };\n if (payload?.recapitulation?.creditToReport > 0 || payload?.recapitulation?.imputedCredit > 0) return { type: CustomerVatType.VAT_REPORT, amount: payload?.recapitulation?.creditToReport ?? payload?.recapitulation?.imputedCredit, ...other };\n return { type: CustomerVatType.VAT_TO_PAY, amount: 0, ...other };\n }\n\n return {\n type: null, amount: null, collectable: 0, deductible: 0,\n };\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.144",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
package/ts/api/resources/Das.ts
CHANGED
|
@@ -15,7 +15,7 @@ export class Das extends Resource {
|
|
|
15
15
|
return this.axios.$post(`/societies/${idSociety}/das/${idRegistration}/declare`, payload);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
preview(idSociety: number, payload:
|
|
18
|
+
preview(idSociety: number, payload: CreateDasRegistration): Promise<string> {
|
|
19
19
|
return this.axios.$post(`/societies/${idSociety}/das/preview`, payload);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -12,9 +12,17 @@ import {
|
|
|
12
12
|
ReadRegistrationAdjustment,
|
|
13
13
|
QueryPaginatedRegistrationWithType,
|
|
14
14
|
BasePaginate,
|
|
15
|
+
UpdateRegistration,
|
|
15
16
|
} from '../../types';
|
|
16
17
|
|
|
17
18
|
export class Registration extends Resource {
|
|
19
|
+
updateToRegisteredManually(idSociety: number, idRegistration: number, idUser: number): Promise<{ data: ReadRegistration }> {
|
|
20
|
+
const params: UpdateRegistration = {
|
|
21
|
+
idUser, isComplete: true, sendAt: new Date(), response: null, idDeposit: null,
|
|
22
|
+
};
|
|
23
|
+
return this.axios.patch(`/societies/${idSociety}/registrations/${idRegistration}`, params);
|
|
24
|
+
}
|
|
25
|
+
|
|
18
26
|
updateOrCreate(
|
|
19
27
|
idExercice: number,
|
|
20
28
|
params: CreateRegistration,
|
|
@@ -34,10 +42,14 @@ export class Registration extends Resource {
|
|
|
34
42
|
...(params ? { params } : {}),
|
|
35
43
|
});
|
|
36
44
|
}
|
|
45
|
+
|
|
37
46
|
declare(id: number, params: DeclareRegistration): Promise<ReadRegistration> {
|
|
38
47
|
return this.axios.$post(`/registrations/${id}/declare`, params);
|
|
39
48
|
}
|
|
40
49
|
|
|
50
|
+
delete(idSociety: number, idRegistration: number): Promise<true> {
|
|
51
|
+
return this.axios.$delete(`/societies/${idSociety}/registrations/${idRegistration}`);
|
|
52
|
+
}
|
|
41
53
|
|
|
42
54
|
getPaginated(idSociety: number, query: QueryPaginatedRegistrationWithType): Promise<BasePaginate<ReadRegistration>> {
|
|
43
55
|
return this.axios.$get(`/societies/${idSociety}/registrations/paginated`, { params: query });
|
package/ts/api/resources/Vat.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
BasePaginate, CreateRegistrationDetail, DeclareVatRegistration, IAccountingTransaction, ICustomerVat, QueryCerfa, QueryPaginatedRegistration, QueryPreviousVatDeclaration, QueryVatEntry, QueryVatMigrationEntry, ReadFormattedAccountingTransaction, ReadRegistration, ReadVatDeclarationUpdatedEntry, ReadVatEntry, ReadVatVariousOperations, UpdateOrCreateVatAdvance, UpdateOrCreateVatRegistration,
|
|
2
|
+
BasePaginate, CreateRegistrationDetail, DeclareVatRegistration, IAccountingTransaction, ICustomerVat, QueryCerfa, QueryPaginatedRegistration, QueryPreviousVatDeclaration, QueryVatEntry, QueryVatMigrationEntry, ReadFormattedAccountingTransaction, ReadRegistration, ReadVatDeclarationUpdatedEntry, ReadVatEntry, ReadVatVariousOperations, UpdateOrCreateVatAdvance, UpdateOrCreateVatRegistration,
|
|
3
3
|
} from '../..';
|
|
4
4
|
import { Resource } from '../Resource';
|
|
5
5
|
|
|
6
6
|
export class Vat extends Resource {
|
|
7
|
-
updateToRegisteredManually(idSociety: number, idRegistration: number, idUser: number): Promise<{ data: ReadRegistration }> {
|
|
8
|
-
const params: UpdateRegistration = {
|
|
9
|
-
idUser, isComplete: true, sendAt: new Date(), response: null, idDeposit: null,
|
|
10
|
-
};
|
|
11
|
-
return this.axios.patch(`/societies/${idSociety}/registrations/${idRegistration}`, params);
|
|
12
|
-
}
|
|
13
7
|
|
|
14
8
|
getVariousOperations(idSociety: number, id: number): Promise<ReadVatVariousOperations[]> {
|
|
15
9
|
return this.axios.$get(`/societies/${idSociety}/vat/${id}/various-operations`);
|
package/ts/api/resources.ts
CHANGED
|
@@ -30,6 +30,7 @@ import { Stocks } from './resources/Stocks';
|
|
|
30
30
|
import { Loan } from './resources/Loan';
|
|
31
31
|
import { SocietyPromoCode } from './resources/SocietyPromoCode';
|
|
32
32
|
import { Dashboard } from './resources/Dashboard';
|
|
33
|
+
import { Das } from './resources/Das';
|
|
33
34
|
import { ZTicket } from './resources/ZTicket';
|
|
34
35
|
import { IncomeAllocation } from './resources/IncomeAllocation';
|
|
35
36
|
import { CustomerProviderOperation } from './resources/CustomerProviderOperation';
|
|
@@ -276,4 +277,5 @@ export const resources = {
|
|
|
276
277
|
leadsToPartners: LeadsToPartners,
|
|
277
278
|
changeLog: ChangeLog,
|
|
278
279
|
constitutionHistory: ConstitutionHistory,
|
|
279
|
-
|
|
280
|
+
das: Das,
|
|
281
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated ids are differents in environments / brands
|
|
3
|
+
*/
|
|
1
4
|
export enum FolderFile {
|
|
2
5
|
REFUND = 1,
|
|
3
6
|
SOCIAL = 2,
|
|
@@ -32,6 +35,9 @@ export enum FolderFile {
|
|
|
32
35
|
MAIL = 31,
|
|
33
36
|
}
|
|
34
37
|
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated ids are differents in environments / brands
|
|
40
|
+
*/
|
|
35
41
|
export const FolderFileList: Array<{ value: string; id: number }> = [
|
|
36
42
|
{ value: 'refunds', id: FolderFile.REFUND },
|
|
37
43
|
{ value: 'socials', id: FolderFile.SOCIAL },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsArray, IsBoolean, IsDateString,
|
|
1
|
+
import { IsArray, IsBoolean, IsDateString, IsOptional } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
3
|
import { DasNature } from '../../../Enum/Das';
|
|
4
4
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
@@ -133,10 +133,4 @@ export class CreateDasRegistration {
|
|
|
133
133
|
@ApiProperty()
|
|
134
134
|
@IsDateString()
|
|
135
135
|
endDate: string;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export class QueryDasPreview {
|
|
139
|
-
@ApiProperty()
|
|
140
|
-
@IsObject()
|
|
141
|
-
payload: Das2PdfForm;
|
|
142
136
|
}
|
|
@@ -128,7 +128,7 @@ export function getTicks(registration: ReadRegistration): ReadRegistrationTick[]
|
|
|
128
128
|
export function getTypeAndAmountFromRegistration(registration: IRegistration): { type: CustomerVatType | null; amount: number | null; collectable: number; deductible: number; } {
|
|
129
129
|
if (registration.idCerfaType === CerfaType.CERFA_3310) {
|
|
130
130
|
const payload = registration.payload.cerfa3310 as Cerfa3310_2023;
|
|
131
|
-
const other = { collectable: payload.vat
|
|
131
|
+
const other = { collectable: payload.vat?.grossDue, deductible: payload.vat?.deductible.total };
|
|
132
132
|
if (payload?.isNil) return { type: CustomerVatType.VAT_TO_NIL, amount: 0, ...other };
|
|
133
133
|
if (payload?.toPay?.total > 0) return { type: CustomerVatType.VAT_TO_PAY, amount: payload.toPay.total, ...other };
|
|
134
134
|
if (payload?.credit?.refundAsked > 0) return { type: CustomerVatType.VAT_REFUND, amount: payload.credit.refundAsked, ...other };
|