@silexpert/core 1.1.23 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api/resources/AccountingFiles.d.ts +1 -1
- package/es/api/resources/AccountingFiles.d.ts.map +1 -1
- package/es/api/resources/AccountingFiles.js +4 -1
- package/es/api/resources/AccountingFiles.js.map +1 -1
- package/es/api/resources/CashAndExpense.d.ts +8 -0
- package/es/api/resources/CashAndExpense.d.ts.map +1 -0
- package/es/api/resources/CashAndExpense.js +27 -0
- package/es/api/resources/CashAndExpense.js.map +1 -0
- package/es/api/resources/FIle.d.ts +3 -1
- package/es/api/resources/FIle.d.ts.map +1 -1
- package/es/api/resources/FIle.js +3 -0
- package/es/api/resources/FIle.js.map +1 -1
- package/es/api/resources/Mail.d.ts.map +1 -1
- package/es/api/resources/Mail.js +5 -0
- package/es/api/resources/Mail.js.map +1 -1
- package/es/api/resources/Prestations.d.ts +6 -0
- package/es/api/resources/Prestations.d.ts.map +1 -1
- package/es/api/resources/Prestations.js +8 -0
- package/es/api/resources/Prestations.js.map +1 -1
- package/es/api/resources.d.ts +2 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +2 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/Account.d.ts +8 -0
- package/es/types/Enum/Account.d.ts.map +1 -1
- package/es/types/Enum/Account.js +8 -0
- package/es/types/Enum/Account.js.map +1 -1
- package/es/types/Enum/BalanceSheet.d.ts +1 -1
- package/es/types/Enum/BalanceSheet.js +1 -1
- package/es/types/Enum/BalanceSheet.js.map +1 -1
- package/es/types/Enum/BrandClementine.js +2 -2
- package/es/types/Enum/BrandClementine.js.map +1 -1
- package/es/types/Enum/CashDeskTransactionType.d.ts +7 -0
- package/es/types/Enum/CashDeskTransactionType.d.ts.map +1 -0
- package/es/types/Enum/CashDeskTransactionType.js +8 -0
- package/es/types/Enum/CashDeskTransactionType.js.map +1 -0
- package/es/types/Enum/Compensation.d.ts +15 -0
- package/es/types/Enum/Compensation.d.ts.map +1 -0
- package/es/types/Enum/Compensation.js +15 -0
- package/es/types/Enum/Compensation.js.map +1 -0
- package/es/types/Enum/ConstitutionState.d.ts +0 -2
- package/es/types/Enum/ConstitutionState.d.ts.map +1 -1
- package/es/types/Enum/ConstitutionState.js +10 -10
- package/es/types/Enum/ConstitutionState.js.map +1 -1
- package/es/types/Enum/InternalService.d.ts +12 -0
- package/es/types/Enum/InternalService.d.ts.map +1 -1
- package/es/types/Enum/InternalService.js +12 -0
- package/es/types/Enum/InternalService.js.map +1 -1
- package/es/types/Enum/JobTitle.d.ts +7 -1
- package/es/types/Enum/JobTitle.d.ts.map +1 -1
- package/es/types/Enum/JobTitle.js +36 -0
- package/es/types/Enum/JobTitle.js.map +1 -1
- package/es/types/Enum/Log.d.ts +201 -1
- package/es/types/Enum/Log.d.ts.map +1 -1
- package/es/types/Enum/Log.js +200 -0
- package/es/types/Enum/Log.js.map +1 -1
- package/es/types/Enum/MealExpenseThresholds.d.ts.map +1 -1
- package/es/types/Enum/MealExpenseThresholds.js +6 -2
- package/es/types/Enum/MealExpenseThresholds.js.map +1 -1
- package/es/types/Enum/PrestationType.js +1 -1
- package/es/types/Enum/PrestationType.js.map +1 -1
- package/es/types/Enum/ReportService.d.ts +9 -4
- package/es/types/Enum/ReportService.d.ts.map +1 -1
- package/es/types/Enum/ReportService.js +17 -6
- package/es/types/Enum/ReportService.js.map +1 -1
- package/es/types/Enum/Role.d.ts +3 -1
- package/es/types/Enum/Role.d.ts.map +1 -1
- package/es/types/Enum/Role.js +2 -0
- package/es/types/Enum/Role.js.map +1 -1
- package/es/types/Enum/RoleDetail.d.ts +14 -0
- package/es/types/Enum/RoleDetail.d.ts.map +1 -1
- package/es/types/Enum/RoleDetail.js +15 -1
- package/es/types/Enum/RoleDetail.js.map +1 -1
- package/es/types/Enum/TaskResponseType.d.ts +3 -1
- package/es/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/es/types/Enum/TaskResponseType.js +57 -0
- package/es/types/Enum/TaskResponseType.js.map +1 -1
- package/es/types/Enum/ThirdParty.d.ts +7 -0
- package/es/types/Enum/ThirdParty.d.ts.map +1 -0
- package/es/types/Enum/ThirdParty.js +7 -0
- package/es/types/Enum/ThirdParty.js.map +1 -0
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts +1 -0
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.d.ts.map +1 -1
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.js +5 -1
- package/es/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/es/types/Interface/api/archive/ImportSocietyArchive.d.ts +1 -1
- package/es/types/Interface/api/archive/ImportSocietyArchive.d.ts.map +1 -1
- package/es/types/Interface/api/archive/ImportSocietyArchive.js +1 -1
- package/es/types/Interface/api/archive/ImportSocietyArchive.js.map +1 -1
- package/es/types/Interface/api/cashAndExpense/Create.d.ts +27 -0
- package/es/types/Interface/api/cashAndExpense/Create.d.ts.map +1 -0
- package/es/types/Interface/api/cashAndExpense/Create.js +91 -0
- package/es/types/Interface/api/cashAndExpense/Create.js.map +1 -0
- package/es/types/Interface/api/file/Query.d.ts +4 -0
- package/es/types/Interface/api/file/Query.d.ts.map +1 -0
- package/es/types/Interface/api/file/Query.js +17 -0
- package/es/types/Interface/api/file/Query.js.map +1 -0
- package/es/types/Interface/api/generalLedger/IGeneralLedgerAccount.d.ts +2 -0
- package/es/types/Interface/api/generalLedger/IGeneralLedgerAccount.d.ts.map +1 -1
- package/es/types/Interface/api/generalLedger/IGeneralLedgerAccount.js.map +1 -1
- package/es/types/Interface/api/prestation/QueryCreatePrestationSocieties.d.ts +7 -0
- package/es/types/Interface/api/prestation/QueryCreatePrestationSocieties.d.ts.map +1 -0
- package/es/types/Interface/api/prestation/QueryCreatePrestationSocieties.js +39 -0
- package/es/types/Interface/api/prestation/QueryCreatePrestationSocieties.js.map +1 -0
- package/es/types/Interface/api/report/ReadReportStats.d.ts +1 -0
- package/es/types/Interface/api/report/ReadReportStats.d.ts.map +1 -1
- package/es/types/Interface/api/report/ReadReportStats.js.map +1 -1
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts +2 -1
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.d.ts.map +1 -1
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js +9 -4
- package/es/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
- package/es/types/Interface/models/IAccountingTransaction.d.ts +2 -0
- package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +2 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +2 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IEstimateInvoice.d.ts +1 -0
- package/es/types/Interface/models/IEstimateInvoice.d.ts.map +1 -1
- package/es/types/Interface/models/IEstimateInvoice.js.map +1 -1
- package/es/types/Interface/models/IExercice.d.ts +2 -0
- package/es/types/Interface/models/IExercice.d.ts.map +1 -1
- package/es/types/Interface/models/IExercice.js.map +1 -1
- package/es/types/Interface/models/IKilometricAllowanceScale.d.ts +1 -0
- package/es/types/Interface/models/IKilometricAllowanceScale.d.ts.map +1 -1
- package/es/types/Interface/models/IKilometricAllowanceScale.js.map +1 -1
- package/es/types/Interface/models/ILog.d.ts +0 -2
- package/es/types/Interface/models/ILog.d.ts.map +1 -1
- package/es/types/Interface/models/ILog.js.map +1 -1
- package/es/types/Interface/models/IPayment.d.ts +1 -0
- package/es/types/Interface/models/IPayment.d.ts.map +1 -1
- package/es/types/Interface/models/IPayment.js.map +1 -1
- package/es/types/Interface/models/IRegulate.d.ts +5 -3
- package/es/types/Interface/models/IRegulate.d.ts.map +1 -1
- package/es/types/Interface/models/IRegulate.js.map +1 -1
- package/es/types/Interface/models/IReport.d.ts +3 -0
- package/es/types/Interface/models/IReport.d.ts.map +1 -1
- package/es/types/Interface/models/IReport.js.map +1 -1
- package/es/types/Interface/models/ISociety.d.ts +2 -1
- package/es/types/Interface/models/ISociety.d.ts.map +1 -1
- package/es/types/Interface/models/ISociety.js.map +1 -1
- package/es/types/Interface/models/IThirdPartySociety.d.ts +2 -0
- package/es/types/Interface/models/IThirdPartySociety.d.ts.map +1 -1
- package/es/types/Interface/models/IThirdPartySociety.js.map +1 -1
- package/es/types/index.d.ts +6 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +6 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/email/templates/signature.d.ts.map +1 -1
- package/es/utils/email/templates/signature.js +6 -7
- package/es/utils/email/templates/signature.js.map +1 -1
- package/es/utils/quotation.d.ts.map +1 -1
- package/es/utils/quotation.js +5 -3
- package/es/utils/quotation.js.map +1 -1
- package/es/utils/vat/3517/century23.js +99 -99
- package/es/utils/vat/3517/century23.js.map +1 -1
- package/js/api/resources/AccountingFiles.js +4 -1
- package/js/api/resources/AccountingFiles.js.map +1 -1
- package/js/api/resources/CashAndExpense.js +37 -0
- package/js/api/resources/CashAndExpense.js.map +1 -0
- package/js/api/resources/FIle.js +6 -0
- package/js/api/resources/FIle.js.map +1 -1
- package/js/api/resources/Mail.js +5 -0
- package/js/api/resources/Mail.js.map +1 -1
- package/js/api/resources/Prestations.js +8 -0
- package/js/api/resources/Prestations.js.map +1 -1
- package/js/api/resources.js +3 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/Account.js +8 -0
- package/js/types/Enum/Account.js.map +1 -1
- package/js/types/Enum/BalanceSheet.js +1 -1
- package/js/types/Enum/BalanceSheet.js.map +1 -1
- package/js/types/Enum/BrandClementine.js +2 -2
- package/js/types/Enum/BrandClementine.js.map +1 -1
- package/js/types/Enum/CashDeskTransactionType.js +13 -0
- package/js/types/Enum/CashDeskTransactionType.js.map +1 -0
- package/js/types/Enum/Compensation.js +20 -0
- package/js/types/Enum/Compensation.js.map +1 -0
- package/js/types/Enum/ConstitutionState.js +6 -6
- package/js/types/Enum/ConstitutionState.js.map +1 -1
- package/js/types/Enum/InternalService.js +12 -0
- package/js/types/Enum/InternalService.js.map +1 -1
- package/js/types/Enum/JobTitle.js +30 -0
- package/js/types/Enum/JobTitle.js.map +1 -1
- package/js/types/Enum/Log.js +200 -0
- package/js/types/Enum/Log.js.map +1 -1
- package/js/types/Enum/MealExpenseThresholds.js +6 -2
- package/js/types/Enum/MealExpenseThresholds.js.map +1 -1
- package/js/types/Enum/PrestationType.js +1 -1
- package/js/types/Enum/PrestationType.js.map +1 -1
- package/js/types/Enum/ReportService.js +21 -9
- package/js/types/Enum/ReportService.js.map +1 -1
- package/js/types/Enum/Role.js +2 -0
- package/js/types/Enum/Role.js.map +1 -1
- package/js/types/Enum/RoleDetail.js +15 -1
- package/js/types/Enum/RoleDetail.js.map +1 -1
- package/js/types/Enum/TaskResponseType.js +52 -0
- package/js/types/Enum/TaskResponseType.js.map +1 -1
- package/js/types/Enum/ThirdParty.js +12 -0
- package/js/types/Enum/ThirdParty.js.map +1 -0
- package/js/types/Interface/api/accountingFiles/queryAccountingFiles.js +1 -0
- package/js/types/Interface/api/accountingFiles/queryAccountingFiles.js.map +1 -1
- package/js/types/Interface/api/archive/ImportSocietyArchive.js +1 -1
- package/js/types/Interface/api/archive/ImportSocietyArchive.js.map +1 -1
- package/js/types/Interface/api/cashAndExpense/Create.js +44 -0
- package/js/types/Interface/api/cashAndExpense/Create.js.map +1 -0
- package/js/types/Interface/api/file/Query.js +21 -0
- package/js/types/Interface/api/file/Query.js.map +1 -0
- package/js/types/Interface/api/generalLedger/IGeneralLedgerAccount.js.map +1 -1
- package/js/types/Interface/api/prestation/QueryCreatePrestationSocieties.js +30 -0
- package/js/types/Interface/api/prestation/QueryCreatePrestationSocieties.js.map +1 -0
- package/js/types/Interface/api/report/ReadReportStats.js.map +1 -1
- package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js +2 -1
- package/js/types/Interface/api/taxDeadline/QueryTaxDeadline.js.map +1 -1
- package/js/types/Interface/models/IAccountingTransaction.js.map +1 -1
- package/js/types/Interface/models/IApiError.js +2 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/IEstimateInvoice.js.map +1 -1
- package/js/types/Interface/models/IExercice.js.map +1 -1
- package/js/types/Interface/models/IKilometricAllowanceScale.js.map +1 -1
- package/js/types/Interface/models/ILog.js.map +1 -1
- package/js/types/Interface/models/IPayment.js.map +1 -1
- package/js/types/Interface/models/IRegulate.js.map +1 -1
- package/js/types/Interface/models/IReport.js.map +1 -1
- package/js/types/Interface/models/ISociety.js.map +1 -1
- package/js/types/Interface/models/IThirdPartySociety.js.map +1 -1
- package/js/types/index.js +66 -6
- package/js/types/index.js.map +1 -1
- package/js/utils/email/templates/signature.js +6 -7
- package/js/utils/email/templates/signature.js.map +1 -1
- package/js/utils/quotation.js +5 -3
- package/js/utils/quotation.js.map +1 -1
- package/js/utils/vat/3517/century23.js +99 -99
- package/js/utils/vat/3517/century23.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/AccountingFiles.ts +5 -2
- package/ts/api/resources/CashAndExpense.ts +31 -0
- package/ts/api/resources/FIle.ts +5 -0
- package/ts/api/resources/Mail.ts +5 -0
- package/ts/api/resources/Prestations.ts +9 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/Account.ts +8 -0
- package/ts/types/Enum/BalanceSheet.ts +1 -1
- package/ts/types/Enum/BrandClementine.ts +2 -2
- package/ts/types/Enum/CashDeskTransactionType.ts +6 -0
- package/ts/types/Enum/Compensation.ts +14 -0
- package/ts/types/Enum/ConstitutionState.ts +4 -4
- package/ts/types/Enum/InternalService.ts +12 -0
- package/ts/types/Enum/JobTitle.ts +36 -0
- package/ts/types/Enum/Log.ts +202 -1
- package/ts/types/Enum/MealExpenseThresholds.ts +6 -2
- package/ts/types/Enum/PrestationType.ts +1 -1
- package/ts/types/Enum/ReportService.ts +20 -8
- package/ts/types/Enum/Role.ts +2 -0
- package/ts/types/Enum/RoleDetail.ts +15 -1
- package/ts/types/Enum/TaskResponseType.ts +57 -0
- package/ts/types/Enum/ThirdParty.ts +6 -0
- package/ts/types/Interface/api/accountingFiles/queryAccountingFiles.ts +4 -1
- package/ts/types/Interface/api/archive/ImportSocietyArchive.ts +1 -1
- package/ts/types/Interface/api/cashAndExpense/Create.ts +67 -0
- package/ts/types/Interface/api/file/Query.ts +6 -0
- package/ts/types/Interface/api/generalLedger/IGeneralLedgerAccount.ts +3 -1
- package/ts/types/Interface/api/prestation/QueryCreatePrestationSocieties.ts +27 -0
- package/ts/types/Interface/api/report/ReadReportStats.ts +2 -1
- package/ts/types/Interface/api/taxDeadline/QueryTaxDeadline.ts +7 -3
- package/ts/types/Interface/models/IAccountingTransaction.ts +2 -0
- package/ts/types/Interface/models/IApiError.ts +3 -0
- package/ts/types/Interface/models/IEstimateInvoice.ts +1 -0
- package/ts/types/Interface/models/IExercice.ts +2 -0
- package/ts/types/Interface/models/IKilometricAllowanceScale.ts +1 -0
- package/ts/types/Interface/models/ILog.ts +0 -2
- package/ts/types/Interface/models/IPayment.ts +1 -0
- package/ts/types/Interface/models/IRegulate.ts +5 -3
- package/ts/types/Interface/models/IReport.ts +3 -0
- package/ts/types/Interface/models/ISociety.ts +2 -0
- package/ts/types/Interface/models/IThirdPartySociety.ts +5 -0
- package/ts/types/index.ts +6 -0
- package/ts/utils/email/templates/signature.ts +6 -7
- package/ts/utils/quotation.ts +5 -3
- package/ts/utils/vat/3517/century23.ts +26 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotation.js","sourceRoot":"","sources":["../../ts/utils/quotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE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;QAChC,CAAC,CAAC,CAAC;KACJ;IAED,IAAI,iBAAiB,GAAG,GAAG;QAAE,iBAAiB,GAAG,GAAG,CAAC;IACrD,IAAI,iBAAiB,GAAG,GAAG;QAAE,iBAAiB,GAAG,GAAG,CAAC;IAErD,SAAS,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;IAElD,IAAI,SAAS,GAAG,CAAC;QAAE,SAAS,GAAG,CAAC,CAAC;IAEjC,OAAO;QACL,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,OAAO,CAAC,EAAY;KAChC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,SAAsB;IACvD,sDAAsD;IACtD,MAAM,MAAM,GAAG,KAAK,CAAC;IACrB,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACnD,OAAO,IAAI,CAAC;KACb;IAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACnD,OAAO,IAAI,CAAC;KACb;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import * as dayjs from 'dayjs';\nimport { ForbidenDomain, BasicDomain } from '../types/Enum/MailDomainType';\nimport { Activity } from '../types/Enum/Activity';\nimport { ComptaType } from '../types/Enum/ComptaType';\nimport { ISociety } from '../types/Interface/models/ISociety';\nimport { ICotation } from '../types/Interface/models/ICotation';\nimport {\n BasePaginate,\n IPayment,\n IRating, IReport, ISocietyProceding, ReadClientQuotation,\n} from '../types';\n\ntype getLeadQuotationParams = {\n firstname: string,\n lastname: string,\n phone: string,\n mail: string,\n annualTurnover: number,\n source: number,\n alreadyExist: boolean,\n activitySector: number,\n};\n\nexport function getLeadQuotation(params: getLeadQuotationParams):number {\n const {\n firstname, lastname, phone, mail, annualTurnover, source, alreadyExist, activitySector,\n } = params;\n if (\n firstname === 'test'\n || lastname === 'test'\n || mail?.includes('test')\n || ['606060606', '707070707', '612345678', '712345678', '687654321', '787654321'].includes(phone)\n ) {\n return 0;\n }\n let quotation = 0;\n\n /* cotation du prénom */\n if (firstname) quotation += 5;\n\n /* cotation du nom */\n if (lastname) quotation += 5;\n\n /* cotation du numéro de téléphone */\n if (['6', '7'].includes(phone.substr(0, 1))) {\n quotation += 15;\n } else {\n quotation += 5;\n }\n\n /* cotation de l'adresse email */\n if (BasicDomain.find((domain) => mail?.includes(domain))) {\n quotation += 5;\n } else\n if (!ForbidenDomain.find((domain) => mail?.includes(domain))) {\n quotation += 15;\n }\n\n /* cotation du CA annuel */\n if ([0, 150000, 400000, 783000, 783001].includes(annualTurnover)) {\n quotation += 10;\n } else if ([50000, 234000].includes(annualTurnover)) {\n quotation += 5;\n }\n\n /* cotation de la date d'ajout */\n if ([1, 2, 3, 4, 5].includes(new Date().getDay())) {\n const dateTime = new Date();\n const year = dateTime.getFullYear();\n const month = dateTime.getMonth();\n const day = dateTime.getDate();\n const startTime = new Date(`${year}-${month + 1}-${day} 08:45:00`);\n const endTime = new Date(`${year}-${month + 1}-${day} 18:45:00`);\n if ((startTime.getTime() <= dateTime.getTime()) && (endTime.getTime() >= dateTime.getTime())) {\n quotation += 15;\n } else {\n quotation += 5;\n }\n } else {\n quotation += 5;\n }\n\n /* cotation de la source */\n /* Parrainage */\n if (source === 49) {\n quotation += 10;\n\n /* calendly, appel entrant */\n } else if (source === 2) {\n quotation += 8;\n\n /* adWords, Bing, Formulaire */\n } else if (source === 4) {\n quotation += 6;\n\n /* Chat, Whatsapp */\n } else if ([29, 92].includes(source)) {\n quotation += 2;\n }\n\n /* cotation de la qualité (nombre de champs remplis) */\n const fieldNumber = [firstname, lastname, phone, mail, annualTurnover, activitySector].filter((data) => !!data).length;\n switch (fieldNumber) {\n case 6:\n quotation += 10;\n break;\n case 5:\n quotation += 8;\n break;\n case 4:\n quotation += 6;\n break;\n case 3:\n quotation += 4;\n break;\n case 2:\n quotation += 2;\n break;\n default:\n break;\n }\n\n /* cotation de l'existence du lead (déjà existant ou non) */\n if (alreadyExist) quotation += 8;\n\n /* cotation du secteur d'activité */\n if ([Activity.INFORMATIQUE, Activity.CONSEIL].includes(activitySector)) {\n quotation += 10;\n } else if ([Activity.TRANSPORT, Activity.BTP, Activity.RESTAURATION, Activity.COMMERCANT, Activity.MEDICAL, Activity.PROF_LIB].includes(activitySector)) {\n quotation += 5;\n }\n\n return quotation;\n}\n\n/* besoin en entré de la société concerné avec les différents imports (society), ainsi que la liste des autres sociétés ou l'owner est owner (otherSocieties) */\nexport function getClientQuotation(society: ISociety, otherSocieties: ISociety[], lastNotice: BasePaginate<IRating>, unpaidDetails: [], reports: IReport[], societyProcedings: ISocietyProceding[], tabBankAccount: any, firstPaiement: IPayment[]): ReadClientQuotation {\n let quotationPositive = 0;\n let quotationNegative = 0;\n let quotation = 0;\n const detailQuotation = {\n signature: 0,\n seniority: 0,\n additionalBenefits: 0,\n additionalCompanies: 0,\n unpayed: 0,\n updatedAnnotations: 0,\n bankSynchronization: 0,\n rating: 0,\n labRefused: 0,\n ongoingProceedings: 0,\n report: 0,\n termination: 0,\n created: 0,\n };\n\n // calcul de l'ancienneté de la société\n const anciennete = firstPaiement?.length > 0 ? dayjs().diff(dayjs(firstPaiement[0].datePayment, 'YYYY-MM-DD'), 'years') : 0;\n const ponderation = (anciennete * 0.1) + 1;\n\n /* Type de comptabilité du client (Tresorerie (+10) / Engagement (+15)) */\n if (society.idComptaType) {\n if ([ComptaType.CASH_BASED, ComptaType.CASH_BASED_ASSISTANCE, ComptaType.CASH_BASED_SEIZURE].includes(society.idComptaType)) {\n quotationPositive += 10;\n detailQuotation.signature += 10;\n } else if ([ComptaType.ACCRUALS, ComptaType.ACCRUALS_ASSISTANCE, ComptaType.ACCRUALS_SEIZURE].includes(society.idComptaType)) {\n quotationPositive += 15;\n detailQuotation.signature += 15;\n }\n }\n\n /* Ancienneté (1 ans < firstPaiement < 2 ans (+10) / 2 ans < firstPaiement (+20 / année)) */\n if (firstPaiement?.length > 0) {\n const yearAsClient = Number(new Date().getFullYear()) - Number(new Date(firstPaiement[0].datePayment).getFullYear());\n if (yearAsClient === 1) {\n quotationPositive += 10;\n detailQuotation.seniority += 10;\n } else if (yearAsClient > 1) {\n quotationPositive += (20 * (yearAsClient - 1) + 10);\n detailQuotation.seniority += (20 * (yearAsClient - 1) + 10);\n }\n }\n\n /* Prestations Complémentaires (+5 / prestation) */\n if (society.prestationsSocieties?.length) {\n const prestationsCompl = society.prestationsSocieties.filter((prestation) => prestation.idPrestationComplementary);\n prestationsCompl.forEach(() => {\n quotationPositive += Math.ceil(5 * ponderation);\n detailQuotation.additionalBenefits += Math.ceil(5 * ponderation);\n });\n }\n\n /* Sociétés supplémentaires (+8 / société) */\n if (otherSocieties.length) {\n quotationPositive += Math.ceil(8 * otherSocieties.length * ponderation);\n detailQuotation.additionalCompanies += Math.ceil(8 * otherSocieties.length * ponderation);\n }\n\n /* Impayés (-15 / mois) */\n if (unpaidDetails.length) {\n quotationNegative -= Math.ceil(15 * unpaidDetails.length * ponderation);\n detailQuotation.unpayed -= Math.ceil(15 * unpaidDetails.length * ponderation);\n }\n\n /* annotations à jour */\n if (tabBankAccount.societyAccountingTransactions?.length) {\n // on check s'il y a 80% des lignes annotées (dateLocked)\n let countNotAnnoted = 0;\n let percentageAnnotations = 100;\n tabBankAccount.societyAccountingTransactions.map((na:any) => {\n if (na.dateLocked === null) {\n countNotAnnoted += 1;\n }\n return countNotAnnoted;\n });\n if (countNotAnnoted !== 0) percentageAnnotations = (countNotAnnoted / tabBankAccount.societyAccountingTransactions?.length) * 100;\n if (percentageAnnotations >= 80) {\n quotationPositive += Math.ceil(12 * ponderation);\n detailQuotation.updatedAnnotations += Math.ceil(12 * ponderation);\n } else {\n quotationNegative -= Math.ceil(12 * ponderation);\n detailQuotation.updatedAnnotations -= Math.ceil(12 * ponderation);\n }\n }\n\n /* synchronisation bancaire */\n if (tabBankAccount.societyActivatedBankAccounts?.length) {\n // comptes synchro\n const synchro = tabBankAccount.societyActivatedBankAccounts.length - tabBankAccount.desactivatedBankAccount.length;\n quotationPositive += Math.ceil(12 * synchro * ponderation);\n detailQuotation.bankSynchronization += Math.ceil(12 * synchro * ponderation);\n\n // comptes desynchro\n quotationNegative -= Math.ceil(12 * tabBankAccount.desactivatedBankAccount.length * ponderation);\n detailQuotation.bankSynchronization -= Math.ceil(12 * tabBankAccount.desactivatedBankAccount.length * ponderation);\n }\n\n /* avis */\n if (lastNotice && lastNotice.data.length === 1) {\n if (lastNotice.data[0].average === 5) {\n quotationPositive += Math.ceil(10 * ponderation);\n detailQuotation.rating += Math.ceil(10 * ponderation);\n } else {\n quotationNegative -= 10;\n detailQuotation.rating -= 10;\n }\n }\n\n /* LAB refusée */\n if (!society.societyDetail?.acceptation) {\n quotationNegative -= 10;\n detailQuotation.labRefused -= 10;\n }\n\n /* Cessation de paiement - redressement judiciaire - procédure en cours / signalements / résiliation */\n if (societyProcedings?.length) {\n quotationNegative -= 5 * societyProcedings.length;\n detailQuotation.ongoingProceedings -= 5 * societyProcedings.length;\n }\n\n if (reports?.length) {\n quotationNegative -= 10;\n detailQuotation.report -= 10;\n }\n\n if (society.isWaitingEnd) {\n quotationNegative -= 50;\n detailQuotation.termination -= 50;\n }\n\n /* Création chez nous */\n if (society.prestationsSocieties?.length) {\n const prestationsCreation = society.prestationsSocieties.filter((prestation) => prestation.idPrestationList === 15); // creation pas d'enum\n prestationsCreation.forEach(() => {\n quotationPositive += 10;\n detailQuotation.created += 10;\n });\n }\n\n if (quotationPositive > 100) quotationPositive = 100;\n if (quotationNegative > 100) quotationNegative = 100;\n\n quotation = quotationPositive + quotationNegative;\n\n if (quotation < 0) quotation = 0;\n\n return {\n cotation: quotation,\n data: detailQuotation,\n idSociety: society.id as number,\n };\n}\n\nexport function compareTwoCotation(cotations: ICotation[]):boolean | null {\n // on recupere les 2 dernieres cotations de la societe\n const higher = false;\n if (cotations[0].cotation === cotations[1].cotation) {\n return null;\n } if (cotations[0].cotation > cotations[1].cotation) {\n return true;\n }\n return higher;\n}"]}
|
|
1
|
+
{"version":3,"file":"quotation.js","sourceRoot":"","sources":["../../ts/utils/quotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAoBtD,MAAM,UAAU,gBAAgB,CAAC,MAA8B;IAC7D,MAAM,EACJ,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,GACvF,GAAG,MAAM,CAAC;IACX,IACE,SAAS,KAAK,MAAM;WACjB,QAAQ,KAAK,MAAM;YACnB,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;WACtB,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EACjG;QACA,OAAO,CAAC,CAAC;KACV;IACD,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,wBAAwB;IACxB,IAAI,SAAS;QAAE,SAAS,IAAI,CAAC,CAAC;IAE9B,qBAAqB;IACrB,IAAI,QAAQ;QAAE,SAAS,IAAI,CAAC,CAAC;IAE7B,qCAAqC;IACrC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QAC3C,SAAS,IAAI,EAAE,CAAC;KACjB;SAAM;QACL,SAAS,IAAI,CAAC,CAAC;KAChB;IAED,iCAAiC;IACjC,IAAI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types/Enum/MailDomainType';\nimport { Activity } from '../types/Enum/Activity';\nimport { ComptaType } from '../types/Enum/ComptaType';\nimport { ISociety } from '../types/Interface/models/ISociety';\nimport { ICotation } from '../types/Interface/models/ICotation';\nimport {\n BasePaginate,\n IPayment,\n IRating, IReport, ISocietyProceding, ReadClientQuotation,\n} from '../types';\n\ntype getLeadQuotationParams = {\n firstname: string,\n lastname: string,\n phone: string,\n mail: string,\n annualTurnover: number,\n source: number,\n alreadyExist: boolean,\n activitySector: number,\n};\n\nexport function getLeadQuotation(params: getLeadQuotationParams):number {\n const {\n firstname, lastname, phone, mail, annualTurnover, source, alreadyExist, activitySector,\n } = params;\n if (\n firstname === 'test'\n || lastname === 'test'\n || mail?.includes('test')\n || ['606060606', '707070707', '612345678', '712345678', '687654321', '787654321'].includes(phone)\n ) {\n return 0;\n }\n let quotation = 0;\n\n /* cotation du prénom */\n if (firstname) quotation += 5;\n\n /* cotation du nom */\n if (lastname) quotation += 5;\n\n /* cotation du numéro de téléphone */\n if (['6', '7'].includes(phone.substr(0, 1))) {\n quotation += 15;\n } else {\n quotation += 5;\n }\n\n /* cotation de l'adresse email */\n if (BasicDomain.find((domain) => mail?.includes(domain))) {\n quotation += 5;\n } else\n if (!ForbidenDomain.find((domain) => mail?.includes(domain))) {\n quotation += 15;\n }\n\n /* cotation du CA annuel */\n if ([0, 150000, 400000, 783000, 783001].includes(annualTurnover)) {\n quotation += 10;\n } else if ([50000, 234000].includes(annualTurnover)) {\n quotation += 5;\n }\n\n /* cotation de la date d'ajout */\n if ([1, 2, 3, 4, 5].includes(new Date().getDay())) {\n const dateTime = new Date();\n const year = dateTime.getFullYear();\n const month = dateTime.getMonth();\n const day = dateTime.getDate();\n const startTime = new Date(`${year}-${month + 1}-${day} 08:45:00`);\n const endTime = new Date(`${year}-${month + 1}-${day} 18:45:00`);\n if ((startTime.getTime() <= dateTime.getTime()) && (endTime.getTime() >= dateTime.getTime())) {\n quotation += 15;\n } else {\n quotation += 5;\n }\n } else {\n quotation += 5;\n }\n\n /* cotation de la source */\n /* Parrainage */\n if (source === 49) {\n quotation += 10;\n\n /* calendly, appel entrant */\n } else if (source === 2) {\n quotation += 8;\n\n /* adWords, Bing, Formulaire */\n } else if (source === 4) {\n quotation += 6;\n\n /* Chat, Whatsapp */\n } else if ([29, 92].includes(source)) {\n quotation += 2;\n }\n\n /* cotation de la qualité (nombre de champs remplis) */\n const fieldNumber = [firstname, lastname, phone, mail, annualTurnover, activitySector].filter((data) => !!data).length;\n switch (fieldNumber) {\n case 6:\n quotation += 10;\n break;\n case 5:\n quotation += 8;\n break;\n case 4:\n quotation += 6;\n break;\n case 3:\n quotation += 4;\n break;\n case 2:\n quotation += 2;\n break;\n default:\n break;\n }\n\n /* cotation de l'existence du lead (déjà existant ou non) */\n if (alreadyExist) quotation += 8;\n\n /* cotation du secteur d'activité */\n if ([Activity.INFORMATIQUE, Activity.CONSEIL].includes(activitySector)) {\n quotation += 10;\n } else if ([Activity.TRANSPORT, Activity.BTP, Activity.RESTAURATION, Activity.COMMERCANT, Activity.MEDICAL, Activity.PROF_LIB].includes(activitySector)) {\n quotation += 5;\n }\n\n return quotation;\n}\n\n/* besoin en entré de la société concerné avec les différents imports (society), ainsi que la liste des autres sociétés ou l'owner est owner (otherSocieties) */\nexport function getClientQuotation(society: ISociety, otherSocieties: ISociety[], lastNotice: BasePaginate<IRating>, unpaidDetails: [], reports: IReport[], societyProcedings: ISocietyProceding[], tabBankAccount: any, firstPaiement: IPayment[]): ReadClientQuotation {\n let quotationPositive = 0;\n let quotationNegative = 0;\n let quotation = 0;\n const detailQuotation = {\n signature: 0,\n seniority: 0,\n additionalBenefits: 0,\n additionalCompanies: 0,\n unpayed: 0,\n updatedAnnotations: 0,\n bankSynchronization: 0,\n rating: 0,\n labRefused: 0,\n ongoingProceedings: 0,\n report: 0,\n termination: 0,\n created: 0,\n };\n\n // calcul de l'ancienneté de la société\n const anciennete = firstPaiement?.length > 0 ? dayjs().diff(dayjs(firstPaiement[0].datePayment, 'YYYY-MM-DD'), 'years') : 0;\n const ponderation = (anciennete * 0.1) + 1;\n\n /* Type de comptabilité du client (Tresorerie (+10) / Engagement (+15)) */\n if (society.idComptaType) {\n if ([ComptaType.CASH_BASED, ComptaType.CASH_BASED_ASSISTANCE, ComptaType.CASH_BASED_SEIZURE].includes(society.idComptaType)) {\n quotationPositive += 10;\n detailQuotation.signature += 10;\n } else if ([ComptaType.ACCRUALS, ComptaType.ACCRUALS_ASSISTANCE, ComptaType.ACCRUALS_SEIZURE].includes(society.idComptaType)) {\n quotationPositive += 15;\n detailQuotation.signature += 15;\n }\n }\n\n /* Ancienneté (1 ans < firstPaiement < 2 ans (+10) / 2 ans < firstPaiement (+20 / année)) */\n if (firstPaiement?.length > 0) {\n const yearAsClient = Number(new Date().getFullYear()) - Number(new Date(firstPaiement[0].datePayment).getFullYear());\n if (yearAsClient === 1) {\n quotationPositive += 10;\n detailQuotation.seniority += 10;\n } else if (yearAsClient > 1) {\n quotationPositive += (20 * (yearAsClient - 1) + 10);\n detailQuotation.seniority += (20 * (yearAsClient - 1) + 10);\n }\n }\n\n /* Prestations Complémentaires (+5 / prestation) */\n if (society.prestationsSocieties?.length) {\n const prestationsCompl = society.prestationsSocieties.filter((prestation) => prestation.idPrestationComplementary);\n prestationsCompl.forEach(() => {\n quotationPositive += Math.ceil(5 * ponderation);\n detailQuotation.additionalBenefits += Math.ceil(5 * ponderation);\n });\n }\n\n /* Sociétés supplémentaires (+8 / société) */\n if (otherSocieties.length) {\n quotationPositive += Math.ceil(8 * otherSocieties.length * ponderation);\n detailQuotation.additionalCompanies += Math.ceil(8 * otherSocieties.length * ponderation);\n }\n\n /* Impayés (-15 / mois) */\n if (unpaidDetails.length) {\n quotationNegative -= Math.ceil(15 * unpaidDetails.length * ponderation);\n detailQuotation.unpayed -= Math.ceil(15 * unpaidDetails.length * ponderation);\n }\n\n /* annotations à jour */\n if (tabBankAccount.societyAccountingTransactions?.length) {\n // on check s'il y a 80% des lignes annotées (dateLocked)\n let countNotAnnoted = 0;\n let percentageAnnotations = 100;\n tabBankAccount.societyAccountingTransactions.map((na:any) => {\n if (na.dateLocked === null) {\n countNotAnnoted += 1;\n }\n return countNotAnnoted;\n });\n if (countNotAnnoted !== 0) percentageAnnotations = (countNotAnnoted / tabBankAccount.societyAccountingTransactions?.length) * 100;\n if (percentageAnnotations >= 80) {\n quotationPositive += Math.ceil(12 * ponderation);\n detailQuotation.updatedAnnotations += Math.ceil(12 * ponderation);\n } else {\n quotationNegative -= Math.ceil(12 * ponderation);\n detailQuotation.updatedAnnotations -= Math.ceil(12 * ponderation);\n }\n }\n\n /* synchronisation bancaire */\n if (tabBankAccount.societyActivatedBankAccounts?.length) {\n // comptes synchro\n const synchro = tabBankAccount.societyActivatedBankAccounts.length - tabBankAccount.desactivatedBankAccount.length;\n quotationPositive += Math.ceil(12 * synchro * ponderation);\n detailQuotation.bankSynchronization += Math.ceil(12 * synchro * ponderation);\n\n // comptes desynchro\n quotationNegative -= Math.ceil(12 * tabBankAccount.desactivatedBankAccount.length * ponderation);\n detailQuotation.bankSynchronization -= Math.ceil(12 * tabBankAccount.desactivatedBankAccount.length * ponderation);\n }\n\n /* avis */\n if (lastNotice && lastNotice.data.length === 1) {\n if (lastNotice.data[0].average === 5) {\n quotationPositive += Math.ceil(10 * ponderation);\n detailQuotation.rating += Math.ceil(10 * ponderation);\n } else {\n quotationNegative -= 10;\n detailQuotation.rating -= 10;\n }\n }\n\n /* LAB refusée */\n if (society?.societyDetail) {\n if (!society.societyDetail?.acceptation) {\n quotationNegative -= 10;\n detailQuotation.labRefused -= 10;\n }\n }\n\n /* Cessation de paiement - redressement judiciaire - procédure en cours / signalements / résiliation */\n if (societyProcedings?.length) {\n quotationNegative -= 5 * societyProcedings.length;\n detailQuotation.ongoingProceedings -= 5 * societyProcedings.length;\n }\n\n if (reports?.length) {\n quotationNegative -= 10;\n detailQuotation.report -= 10;\n }\n\n if (society.isWaitingEnd) {\n quotationNegative -= 50;\n detailQuotation.termination -= 50;\n }\n\n /* Création chez nous */\n if (society.prestationsSocieties?.length) {\n const prestationsCreation = society.prestationsSocieties.filter((prestation) => prestation.idPrestationList === 15); // creation pas d'enum\n prestationsCreation.forEach(() => {\n quotationPositive += 10;\n detailQuotation.created += 10;\n });\n }\n\n if (quotationPositive > 100) quotationPositive = 100;\n if (quotationNegative > 100) quotationNegative = 100;\n\n quotation = quotationPositive + quotationNegative;\n\n if (quotation < 0) quotation = 0;\n\n return {\n cotation: quotation,\n data: detailQuotation,\n idSociety: society.id as number,\n };\n}\n\nexport function compareTwoCotation(cotations: ICotation[]):boolean | null {\n // on recupere les 2 dernieres cotations de la societe\n const higher = false;\n if (cotations[0].cotation === cotations[1].cotation) {\n return null;\n } if (cotations[0].cotation > cotations[1].cotation) {\n return true;\n }\n return higher;\n}"]}
|
|
@@ -4,9 +4,9 @@ import { round as _round } from 'lodash';
|
|
|
4
4
|
import { Vat } from '../../../types/Enum/Vat';
|
|
5
5
|
import { getAmountByAccountNumber, getTaxAmountByAccountNumber, textFormatting } from '../utils';
|
|
6
6
|
export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
7
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160;
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186;
|
|
8
8
|
const shouldHaveVatCode = isDefined((_a = payload.setting) === null || _a === void 0 ? void 0 : _a.tvaCode) && isDefined(payload.society.siret);
|
|
9
|
-
const shouldFillRefund = _round((_b = payload.refund.asked) !== null &&
|
|
9
|
+
const shouldFillRefund = _round((_c = (_b = payload.refund) === null || _b === void 0 ? void 0 : _b.asked) !== null && _c !== void 0 ? _c : 0) > 0;
|
|
10
10
|
const isNil = payload.isNil === true;
|
|
11
11
|
const vats = Object.values(Vat);
|
|
12
12
|
const vatEntries = accountingEntries.filter((ae) => typeof ae.idVat === 'number');
|
|
@@ -26,14 +26,14 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
26
26
|
const saleOfImmobilization = getAmountByAccountNumber(vatEntries.filter((ae) => !withoutTaxVat.includes(ae.idVat) && frenchVat.includes(ae.idVat)), ['775']);
|
|
27
27
|
const onInvoiceDeductible = getAmountByAccountNumber(vatEntries, ['445660']);
|
|
28
28
|
const onImmobilizationDeductible = getAmountByAccountNumber(vatEntries, ['445662']);
|
|
29
|
-
const julyAdvance = (
|
|
30
|
-
const julyAdvancePayload = (
|
|
31
|
-
const decemberAdvance = (
|
|
32
|
-
const decemberAdvancePayload = (
|
|
29
|
+
const julyAdvance = (_e = (_d = payload === null || payload === void 0 ? void 0 : payload.exerciceAdvanceRegistrations) === null || _d === void 0 ? void 0 : _d.find((a) => dayjs(a.endDate).month() === 6)) !== null && _e !== void 0 ? _e : null;
|
|
30
|
+
const julyAdvancePayload = (_f = julyAdvance === null || julyAdvance === void 0 ? void 0 : julyAdvance.payload) !== null && _f !== void 0 ? _f : null;
|
|
31
|
+
const decemberAdvance = (_h = (_g = payload === null || payload === void 0 ? void 0 : payload.exerciceAdvanceRegistrations) === null || _g === void 0 ? void 0 : _g.find((a) => dayjs(a.endDate).month() === 11)) !== null && _h !== void 0 ? _h : null;
|
|
32
|
+
const decemberAdvancePayload = (_j = decemberAdvance === null || decemberAdvance === void 0 ? void 0 : decemberAdvance.payload) !== null && _j !== void 0 ? _j : null;
|
|
33
33
|
const data = {
|
|
34
34
|
isNil: payload.isNil === true,
|
|
35
35
|
declaration: {
|
|
36
|
-
comment: (
|
|
36
|
+
comment: (_k = payload.comment) !== null && _k !== void 0 ? _k : null,
|
|
37
37
|
period: {
|
|
38
38
|
start: {
|
|
39
39
|
day: dayjs(payload.startDate).format('DD'),
|
|
@@ -53,7 +53,7 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
53
53
|
},
|
|
54
54
|
},
|
|
55
55
|
numbers: {
|
|
56
|
-
SIE: (
|
|
56
|
+
SIE: (_m = (_l = payload.sie) === null || _l === void 0 ? void 0 : _l.sages) !== null && _m !== void 0 ? _m : null,
|
|
57
57
|
folder: null,
|
|
58
58
|
key: null,
|
|
59
59
|
period: null,
|
|
@@ -63,13 +63,13 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
63
63
|
system: null,
|
|
64
64
|
},
|
|
65
65
|
intracommunityVat: {
|
|
66
|
-
first: shouldHaveVatCode ? ((
|
|
67
|
-
second: shouldHaveVatCode ? ((
|
|
68
|
-
third: shouldHaveVatCode ? ((
|
|
66
|
+
first: shouldHaveVatCode ? ((_q = (_p = (_o = payload.setting) === null || _o === void 0 ? void 0 : _o.tvaCode) === null || _p === void 0 ? void 0 : _p.slice(0, 2)) !== null && _q !== void 0 ? _q : null) : null,
|
|
67
|
+
second: shouldHaveVatCode ? ((_t = (_s = (_r = payload.setting) === null || _r === void 0 ? void 0 : _r.tvaCode) === null || _s === void 0 ? void 0 : _s.slice(2, 4)) !== null && _t !== void 0 ? _t : null) : null,
|
|
68
|
+
third: shouldHaveVatCode ? ((_v = (_u = payload.society.siret) === null || _u === void 0 ? void 0 : _u.slice(0, 9)) !== null && _v !== void 0 ? _v : null) : null,
|
|
69
69
|
},
|
|
70
70
|
siret: {
|
|
71
|
-
first: isDefined(payload.society.siret) ? ((
|
|
72
|
-
second: isDefined(payload.society.siret) ? ((
|
|
71
|
+
first: isDefined(payload.society.siret) ? ((_x = (_w = payload.society.siret) === null || _w === void 0 ? void 0 : _w.slice(0, 9)) !== null && _x !== void 0 ? _x : null) : null,
|
|
72
|
+
second: isDefined(payload.society.siret) ? ((_z = (_y = payload.society.siret) === null || _y === void 0 ? void 0 : _y.slice(5)) !== null && _z !== void 0 ? _z : null) : null,
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
75
|
payment: {
|
|
@@ -93,8 +93,8 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
93
93
|
tax: isNil ? 0 : _round(vatNormalRate20 * 0.2),
|
|
94
94
|
},
|
|
95
95
|
normalRate20OnPetrol: {
|
|
96
|
-
base: isNil ? 0 : _round((
|
|
97
|
-
tax: isNil ? 0 : _round((
|
|
96
|
+
base: isNil ? 0 : _round((_1 = (_0 = payload.vat) === null || _0 === void 0 ? void 0 : _0.normalRate20OnPetrol) !== null && _1 !== void 0 ? _1 : 0),
|
|
97
|
+
tax: isNil ? 0 : _round((_3 = (_2 = payload.vat) === null || _2 === void 0 ? void 0 : _2.normalRate20OnPetrol) !== null && _3 !== void 0 ? _3 : 0 * 0.2),
|
|
98
98
|
},
|
|
99
99
|
reduceRate5Dot5: {
|
|
100
100
|
base: isNil ? 0 : _round(vatReducedRate5Dot5),
|
|
@@ -113,24 +113,24 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
113
113
|
tax: isNil ? 0 : _round(vatReducedRate2Dot1 * 0.021),
|
|
114
114
|
},
|
|
115
115
|
particularRate: {
|
|
116
|
-
base: isNil ? 0 : _round((
|
|
117
|
-
tax: isNil ? 0 : _round((
|
|
116
|
+
base: isNil ? 0 : _round((_6 = (_5 = (_4 = payload.vat) === null || _4 === void 0 ? void 0 : _4.particularRate) === null || _5 === void 0 ? void 0 : _5.base) !== null && _6 !== void 0 ? _6 : 0),
|
|
117
|
+
tax: isNil ? 0 : _round((_9 = (_8 = (_7 = payload.vat) === null || _7 === void 0 ? void 0 : _7.particularRate) === null || _8 === void 0 ? void 0 : _8.tax) !== null && _9 !== void 0 ? _9 : 0),
|
|
118
118
|
},
|
|
119
119
|
reducedRateOnPetrol: {
|
|
120
|
-
base: isNil ? 0 : _round((
|
|
121
|
-
tax: isNil ? 0 : _round(((
|
|
120
|
+
base: isNil ? 0 : _round((_11 = (_10 = payload.vat) === null || _10 === void 0 ? void 0 : _10.reducedRateOnPetrol) !== null && _11 !== void 0 ? _11 : 0),
|
|
121
|
+
tax: isNil ? 0 : _round(((_13 = (_12 = payload.vat) === null || _12 === void 0 ? void 0 : _12.reducedRateOnPetrol) !== null && _13 !== void 0 ? _13 : 0) * 0.13),
|
|
122
122
|
},
|
|
123
123
|
oldRate: {
|
|
124
|
-
base: isNil ? 0 : _round((
|
|
125
|
-
tax: isNil ? 0 : _round((
|
|
124
|
+
base: isNil ? 0 : _round((_16 = (_15 = (_14 = payload.vat) === null || _14 === void 0 ? void 0 : _14.oldRate) === null || _15 === void 0 ? void 0 : _15.base) !== null && _16 !== void 0 ? _16 : 0),
|
|
125
|
+
tax: isNil ? 0 : _round((_19 = (_18 = (_17 = payload.vat) === null || _17 === void 0 ? void 0 : _17.oldRate) === null || _18 === void 0 ? void 0 : _18.tax) !== null && _19 !== void 0 ? _19 : 0),
|
|
126
126
|
},
|
|
127
127
|
energyBought: {
|
|
128
|
-
base: isNil ? 0 : _round((
|
|
129
|
-
tax: isNil ? 0 : _round((
|
|
128
|
+
base: isNil ? 0 : _round((_22 = (_21 = (_20 = payload.vat) === null || _20 === void 0 ? void 0 : _20.energyBought) === null || _21 === void 0 ? void 0 : _21.base) !== null && _22 !== void 0 ? _22 : 0),
|
|
129
|
+
tax: isNil ? 0 : _round((_25 = (_24 = (_23 = payload.vat) === null || _23 === void 0 ? void 0 : _23.energyBought) === null || _24 === void 0 ? void 0 : _24.tax) !== null && _25 !== void 0 ? _25 : 0),
|
|
130
130
|
},
|
|
131
131
|
prestation: {
|
|
132
|
-
base: isNil ? 0 : _round((
|
|
133
|
-
tax: isNil ? 0 : _round((
|
|
132
|
+
base: isNil ? 0 : _round((_28 = (_27 = (_26 = payload.vat) === null || _26 === void 0 ? void 0 : _26.prestation) === null || _27 === void 0 ? void 0 : _27.base) !== null && _28 !== void 0 ? _28 : 0),
|
|
133
|
+
tax: isNil ? 0 : _round((_31 = (_30 = (_29 = payload.vat) === null || _29 === void 0 ? void 0 : _29.prestation) === null || _30 === void 0 ? void 0 : _30.tax) !== null && _31 !== void 0 ? _31 : 0),
|
|
134
134
|
},
|
|
135
135
|
prestation2: {
|
|
136
136
|
base: isNil ? 0 : _round(prestation2Base),
|
|
@@ -145,33 +145,33 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
145
145
|
total: { tax: 0 }, // Calculé plus bas
|
|
146
146
|
},
|
|
147
147
|
other: {
|
|
148
|
-
refund: isNil ? 0 : _round((
|
|
149
|
-
previousDeducted: isNil ? 0 : _round((
|
|
150
|
-
sum: isNil ? 0 : _round((
|
|
148
|
+
refund: isNil ? 0 : _round((_33 = (_32 = payload.other) === null || _32 === void 0 ? void 0 : _32.refund) !== null && _33 !== void 0 ? _33 : 0),
|
|
149
|
+
previousDeducted: isNil ? 0 : _round((_35 = (_34 = payload.other) === null || _34 === void 0 ? void 0 : _34.previousDeducted) !== null && _35 !== void 0 ? _35 : 0),
|
|
150
|
+
sum: isNil ? 0 : _round((_37 = (_36 = payload.other) === null || _36 === void 0 ? void 0 : _36.sum) !== null && _37 !== void 0 ? _37 : 0),
|
|
151
151
|
total: 0, // Calculé plus bas
|
|
152
152
|
},
|
|
153
153
|
deductible: {
|
|
154
154
|
onInvoice: isNil ? 0 : _round(onInvoiceDeductible),
|
|
155
|
-
onFlatRate: isNil ? 0 : _round((
|
|
155
|
+
onFlatRate: isNil ? 0 : _round((_39 = (_38 = payload.deductible) === null || _38 === void 0 ? void 0 : _38.onFlatRate) !== null && _39 !== void 0 ? _39 : 0),
|
|
156
156
|
total1: 0,
|
|
157
|
-
rate: isNil ? 0 : _round((
|
|
157
|
+
rate: isNil ? 0 : _round((_41 = (_40 = payload.deductible) === null || _40 === void 0 ? void 0 : _40.rate) !== null && _41 !== void 0 ? _41 : 100, 2),
|
|
158
158
|
onImmobilization: isNil ? 0 : _round(onImmobilizationDeductible),
|
|
159
|
-
previousCredit: isNil ? 0 : _round((
|
|
160
|
-
forget: isNil ? 0 : _round((
|
|
161
|
-
sumToImpute: isNil ? 0 : _round((
|
|
159
|
+
previousCredit: isNil ? 0 : _round((_43 = (_42 = payload.deductible) === null || _42 === void 0 ? void 0 : _42.previousCredit) !== null && _43 !== void 0 ? _43 : 0),
|
|
160
|
+
forget: isNil ? 0 : _round((_45 = (_44 = payload.deductible) === null || _44 === void 0 ? void 0 : _44.forget) !== null && _45 !== void 0 ? _45 : 0),
|
|
161
|
+
sumToImpute: isNil ? 0 : _round((_47 = (_46 = payload.deductible) === null || _46 === void 0 ? void 0 : _46.sumToImpute) !== null && _47 !== void 0 ? _47 : 0),
|
|
162
162
|
total: 0,
|
|
163
|
-
vatDeductible: isNil ? 0 : _round((
|
|
163
|
+
vatDeductible: isNil ? 0 : _round((_49 = (_48 = payload.deductible) === null || _48 === void 0 ? void 0 : _48.vatDeductible) !== null && _49 !== void 0 ? _49 : 0),
|
|
164
164
|
},
|
|
165
165
|
net: {
|
|
166
166
|
due: 0,
|
|
167
167
|
credit: 0,
|
|
168
168
|
advance1: {
|
|
169
|
-
paid: isNil ? 0 : _round(((
|
|
170
|
-
toPay: isNil ? 0 : _round((
|
|
169
|
+
paid: isNil ? 0 : _round(((_50 = julyAdvancePayload === null || julyAdvancePayload === void 0 ? void 0 : julyAdvancePayload.amountWanted) !== null && _50 !== void 0 ? _50 : 0) * 0.55),
|
|
170
|
+
toPay: isNil ? 0 : _round((_52 = (_51 = payload.advance1) === null || _51 === void 0 ? void 0 : _51.toPay) !== null && _52 !== void 0 ? _52 : 0),
|
|
171
171
|
},
|
|
172
172
|
advance2: {
|
|
173
|
-
paid: isNil ? 0 : _round(((
|
|
174
|
-
toPay: isNil ? 0 : _round((
|
|
173
|
+
paid: isNil ? 0 : _round(((_53 = decemberAdvancePayload === null || decemberAdvancePayload === void 0 ? void 0 : decemberAdvancePayload.amountWanted) !== null && _53 !== void 0 ? _53 : 0) * 0.4),
|
|
174
|
+
toPay: isNil ? 0 : _round((_55 = (_54 = payload.advance2) === null || _54 === void 0 ? void 0 : _54.toPay) !== null && _55 !== void 0 ? _55 : 0),
|
|
175
175
|
},
|
|
176
176
|
advance: {
|
|
177
177
|
toPay: 0,
|
|
@@ -183,67 +183,67 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
183
183
|
balanceSurplus: 0, // Calculé plus bas
|
|
184
184
|
},
|
|
185
185
|
tax: {
|
|
186
|
-
onRetransmission: isNil ? 0 : _round((
|
|
187
|
-
onResultFarm: isNil ? 0 : _round((
|
|
186
|
+
onRetransmission: isNil ? 0 : _round((_57 = (_56 = payload.tax) === null || _56 === void 0 ? void 0 : _56.onRetransmission) !== null && _57 !== void 0 ? _57 : 0),
|
|
187
|
+
onResultFarm: isNil ? 0 : _round((_59 = (_58 = payload.tax) === null || _58 === void 0 ? void 0 : _58.onResultFarm) !== null && _59 !== void 0 ? _59 : 0),
|
|
188
188
|
payingVideo: {
|
|
189
|
-
reduced: isNil ? 0 : _round((
|
|
190
|
-
normal: isNil ? 0 : _round((
|
|
189
|
+
reduced: isNil ? 0 : _round((_62 = (_61 = (_60 = payload.tax) === null || _60 === void 0 ? void 0 : _60.payingVideo) === null || _61 === void 0 ? void 0 : _61.reduced) !== null && _62 !== void 0 ? _62 : 0),
|
|
190
|
+
normal: isNil ? 0 : _round((_65 = (_64 = (_63 = payload.tax) === null || _63 === void 0 ? void 0 : _63.payingVideo) === null || _64 === void 0 ? void 0 : _64.normal) !== null && _65 !== void 0 ? _65 : 0),
|
|
191
191
|
},
|
|
192
192
|
freeVideo: {
|
|
193
|
-
reduce: isNil ? 0 : _round((
|
|
194
|
-
normal: isNil ? 0 : _round((
|
|
193
|
+
reduce: isNil ? 0 : _round((_68 = (_67 = (_66 = payload.tax) === null || _66 === void 0 ? void 0 : _66.freeVideo) === null || _67 === void 0 ? void 0 : _67.reduced) !== null && _68 !== void 0 ? _68 : 0),
|
|
194
|
+
normal: isNil ? 0 : _round((_71 = (_70 = (_69 = payload.tax) === null || _69 === void 0 ? void 0 : _69.freeVideo) === null || _70 === void 0 ? void 0 : _70.normal) !== null && _71 !== void 0 ? _71 : 0),
|
|
195
195
|
},
|
|
196
|
-
bailiff: isNil ? 0 : _round((
|
|
197
|
-
contribution: isNil ? 0 : _round((
|
|
198
|
-
ofEmployer: isNil ? 0 : _round((
|
|
199
|
-
onBoardingCorse: isNil ? 0 : _round((
|
|
200
|
-
onBoarding: isNil ? 0 : _round((
|
|
201
|
-
development: isNil ? 0 : _round((
|
|
202
|
-
publicity: isNil ? 0 : _round((
|
|
203
|
-
onCompanySurplus: isNil ? 0 : _round((
|
|
204
|
-
onPublicElectricity: isNil ? 0 : _round((
|
|
205
|
-
onCanceledOrders: isNil ? 0 : _round((
|
|
206
|
-
specialDue: isNil ? 0 : _round((
|
|
207
|
-
slaughter: isNil ? 0 : _round((
|
|
208
|
-
cutting: isNil ? 0 : _round((
|
|
209
|
-
substances: isNil ? 0 : _round((
|
|
210
|
-
fishing: isNil ? 0 : _round((
|
|
211
|
-
fishingProduct: isNil ? 0 : _round((
|
|
212
|
-
agreement: isNil ? 0 : _round((
|
|
196
|
+
bailiff: isNil ? 0 : _round((_73 = (_72 = payload.tax) === null || _72 === void 0 ? void 0 : _72.bailiff) !== null && _73 !== void 0 ? _73 : 0),
|
|
197
|
+
contribution: isNil ? 0 : _round((_75 = (_74 = payload.tax) === null || _74 === void 0 ? void 0 : _74.contribution) !== null && _75 !== void 0 ? _75 : 0),
|
|
198
|
+
ofEmployer: isNil ? 0 : _round((_77 = (_76 = payload.tax) === null || _76 === void 0 ? void 0 : _76.ofEmployer) !== null && _77 !== void 0 ? _77 : 0),
|
|
199
|
+
onBoardingCorse: isNil ? 0 : _round((_79 = (_78 = payload.tax) === null || _78 === void 0 ? void 0 : _78.onBoardingCorse) !== null && _79 !== void 0 ? _79 : 0),
|
|
200
|
+
onBoarding: isNil ? 0 : _round((_81 = (_80 = payload.tax) === null || _80 === void 0 ? void 0 : _80.onBoarding) !== null && _81 !== void 0 ? _81 : 0),
|
|
201
|
+
development: isNil ? 0 : _round((_83 = (_82 = payload.tax) === null || _82 === void 0 ? void 0 : _82.development) !== null && _83 !== void 0 ? _83 : 0),
|
|
202
|
+
publicity: isNil ? 0 : _round((_85 = (_84 = payload.tax) === null || _84 === void 0 ? void 0 : _84.publicity) !== null && _85 !== void 0 ? _85 : 0),
|
|
203
|
+
onCompanySurplus: isNil ? 0 : _round((_87 = (_86 = payload.tax) === null || _86 === void 0 ? void 0 : _86.onCompanySurplus) !== null && _87 !== void 0 ? _87 : 0),
|
|
204
|
+
onPublicElectricity: isNil ? 0 : _round((_89 = (_88 = payload.tax) === null || _88 === void 0 ? void 0 : _88.onPublicElectricity) !== null && _89 !== void 0 ? _89 : 0),
|
|
205
|
+
onCanceledOrders: isNil ? 0 : _round((_91 = (_90 = payload.tax) === null || _90 === void 0 ? void 0 : _90.onCanceledOrders) !== null && _91 !== void 0 ? _91 : 0),
|
|
206
|
+
specialDue: isNil ? 0 : _round((_93 = (_92 = payload.tax) === null || _92 === void 0 ? void 0 : _92.specialDue) !== null && _93 !== void 0 ? _93 : 0),
|
|
207
|
+
slaughter: isNil ? 0 : _round((_95 = (_94 = payload.tax) === null || _94 === void 0 ? void 0 : _94.slaughter) !== null && _95 !== void 0 ? _95 : 0),
|
|
208
|
+
cutting: isNil ? 0 : _round((_97 = (_96 = payload.tax) === null || _96 === void 0 ? void 0 : _96.cutting) !== null && _97 !== void 0 ? _97 : 0),
|
|
209
|
+
substances: isNil ? 0 : _round((_99 = (_98 = payload.tax) === null || _98 === void 0 ? void 0 : _98.substances) !== null && _99 !== void 0 ? _99 : 0),
|
|
210
|
+
fishing: isNil ? 0 : _round((_101 = (_100 = payload.tax) === null || _100 === void 0 ? void 0 : _100.fishing) !== null && _101 !== void 0 ? _101 : 0),
|
|
211
|
+
fishingProduct: isNil ? 0 : _round((_103 = (_102 = payload.tax) === null || _102 === void 0 ? void 0 : _102.fishingProduct) !== null && _103 !== void 0 ? _103 : 0),
|
|
212
|
+
agreement: isNil ? 0 : _round((_105 = (_104 = payload.tax) === null || _104 === void 0 ? void 0 : _104.agreement) !== null && _105 !== void 0 ? _105 : 0),
|
|
213
213
|
phyto: {
|
|
214
|
-
onCirculation: isNil ? 0 : _round((
|
|
215
|
-
onExportation: isNil ? 0 : _round((
|
|
216
|
-
total: isNil ? 0 : _round((
|
|
214
|
+
onCirculation: isNil ? 0 : _round((_108 = (_107 = (_106 = payload.tax) === null || _106 === void 0 ? void 0 : _106.phyto) === null || _107 === void 0 ? void 0 : _107.onCirculation) !== null && _108 !== void 0 ? _108 : 0),
|
|
215
|
+
onExportation: isNil ? 0 : _round((_111 = (_110 = (_109 = payload.tax) === null || _109 === void 0 ? void 0 : _109.phyto) === null || _110 === void 0 ? void 0 : _110.onExportation) !== null && _111 !== void 0 ? _111 : 0),
|
|
216
|
+
total: isNil ? 0 : _round((_114 = (_113 = (_112 = payload.tax) === null || _112 === void 0 ? void 0 : _112.phyto) === null || _113 === void 0 ? void 0 : _113.total) !== null && _114 !== void 0 ? _114 : 0),
|
|
217
217
|
},
|
|
218
218
|
onPreciousMetal: {
|
|
219
|
-
normalRate: isNil ? 0 : _round((
|
|
220
|
-
reduceRate: isNil ? 0 : _round((
|
|
219
|
+
normalRate: isNil ? 0 : _round((_117 = (_116 = (_115 = payload.tax) === null || _115 === void 0 ? void 0 : _115.onPreciousMetal) === null || _116 === void 0 ? void 0 : _116.normalRate) !== null && _117 !== void 0 ? _117 : 0),
|
|
220
|
+
reduceRate: isNil ? 0 : _round((_120 = (_119 = (_118 = payload.tax) === null || _118 === void 0 ? void 0 : _118.onPreciousMetal) === null || _119 === void 0 ? void 0 : _119.reduceRate) !== null && _120 !== void 0 ? _120 : 0),
|
|
221
221
|
},
|
|
222
|
-
onContribution: isNil ? 0 : _round((
|
|
223
|
-
onSaleAntiquity: isNil ? 0 : _round((
|
|
224
|
-
onYearly: isNil ? 0 : _round((
|
|
225
|
-
onCO2: isNil ? 0 : _round((
|
|
226
|
-
oldVehicle: isNil ? 0 : _round((
|
|
227
|
-
profit: isNil ? 0 : _round((
|
|
228
|
-
social: isNil ? 0 : _round((
|
|
229
|
-
fromOtherCountry: isNil ? 0 : _round((
|
|
230
|
-
trottingRace: isNil ? 0 : _round((
|
|
231
|
-
gallopRace: isNil ? 0 : _round((
|
|
232
|
-
sportBetting: isNil ? 0 : _round((
|
|
233
|
-
sportBettingSocial: isNil ? 0 : _round((
|
|
234
|
-
sportBettingSport: isNil ? 0 : _round((
|
|
235
|
-
sportBettingCommercial: isNil ? 0 : _round((
|
|
236
|
-
sportBettingCommercialSocial: isNil ? 0 : _round((
|
|
237
|
-
sportBettingCommercialSport: isNil ? 0 : _round((
|
|
238
|
-
onlineGame: isNil ? 0 : _round((
|
|
239
|
-
onlineGameSocial: isNil ? 0 : _round((
|
|
240
|
-
fuelExploration: isNil ? 0 : _round((
|
|
241
|
-
nonAlcool: isNil ? 0 : _round((
|
|
242
|
-
nonAlcoolWithSugar: isNil ? 0 : _round((
|
|
243
|
-
nonAlcoolWithEdul: isNil ? 0 : _round((
|
|
244
|
-
mineralWater: isNil ? 0 : _round((
|
|
245
|
-
numericalService: isNil ? 0 : _round((
|
|
246
|
-
platform: isNil ? 0 : _round((
|
|
222
|
+
onContribution: isNil ? 0 : _round((_122 = (_121 = payload.tax) === null || _121 === void 0 ? void 0 : _121.onContribution) !== null && _122 !== void 0 ? _122 : 0),
|
|
223
|
+
onSaleAntiquity: isNil ? 0 : _round((_124 = (_123 = payload.tax) === null || _123 === void 0 ? void 0 : _123.onSaleAntiquity) !== null && _124 !== void 0 ? _124 : 0),
|
|
224
|
+
onYearly: isNil ? 0 : _round((_126 = (_125 = payload.tax) === null || _125 === void 0 ? void 0 : _125.onYearly) !== null && _126 !== void 0 ? _126 : 0),
|
|
225
|
+
onCO2: isNil ? 0 : _round((_128 = (_127 = payload.tax) === null || _127 === void 0 ? void 0 : _127.onCO2) !== null && _128 !== void 0 ? _128 : 0),
|
|
226
|
+
oldVehicle: isNil ? 0 : _round((_130 = (_129 = payload.tax) === null || _129 === void 0 ? void 0 : _129.oldVehicle) !== null && _130 !== void 0 ? _130 : 0),
|
|
227
|
+
profit: isNil ? 0 : _round((_132 = (_131 = payload.tax) === null || _131 === void 0 ? void 0 : _131.profit) !== null && _132 !== void 0 ? _132 : 0),
|
|
228
|
+
social: isNil ? 0 : _round((_134 = (_133 = payload.tax) === null || _133 === void 0 ? void 0 : _133.social) !== null && _134 !== void 0 ? _134 : 0),
|
|
229
|
+
fromOtherCountry: isNil ? 0 : _round((_136 = (_135 = payload.tax) === null || _135 === void 0 ? void 0 : _135.fromOtherCountry) !== null && _136 !== void 0 ? _136 : 0),
|
|
230
|
+
trottingRace: isNil ? 0 : _round((_138 = (_137 = payload.tax) === null || _137 === void 0 ? void 0 : _137.trottingRace) !== null && _138 !== void 0 ? _138 : 0),
|
|
231
|
+
gallopRace: isNil ? 0 : _round((_140 = (_139 = payload.tax) === null || _139 === void 0 ? void 0 : _139.gallopRace) !== null && _140 !== void 0 ? _140 : 0),
|
|
232
|
+
sportBetting: isNil ? 0 : _round((_142 = (_141 = payload.tax) === null || _141 === void 0 ? void 0 : _141.sportBetting) !== null && _142 !== void 0 ? _142 : 0),
|
|
233
|
+
sportBettingSocial: isNil ? 0 : _round((_144 = (_143 = payload.tax) === null || _143 === void 0 ? void 0 : _143.sportBettingSocial) !== null && _144 !== void 0 ? _144 : 0),
|
|
234
|
+
sportBettingSport: isNil ? 0 : _round((_146 = (_145 = payload.tax) === null || _145 === void 0 ? void 0 : _145.sportBettingSport) !== null && _146 !== void 0 ? _146 : 0),
|
|
235
|
+
sportBettingCommercial: isNil ? 0 : _round((_148 = (_147 = payload.tax) === null || _147 === void 0 ? void 0 : _147.sportBettingCommercial) !== null && _148 !== void 0 ? _148 : 0),
|
|
236
|
+
sportBettingCommercialSocial: isNil ? 0 : _round((_150 = (_149 = payload.tax) === null || _149 === void 0 ? void 0 : _149.sportBettingCommercialSocial) !== null && _150 !== void 0 ? _150 : 0),
|
|
237
|
+
sportBettingCommercialSport: isNil ? 0 : _round((_152 = (_151 = payload.tax) === null || _151 === void 0 ? void 0 : _151.sportBettingCommercialSport) !== null && _152 !== void 0 ? _152 : 0),
|
|
238
|
+
onlineGame: isNil ? 0 : _round((_154 = (_153 = payload.tax) === null || _153 === void 0 ? void 0 : _153.onlineGame) !== null && _154 !== void 0 ? _154 : 0),
|
|
239
|
+
onlineGameSocial: isNil ? 0 : _round((_156 = (_155 = payload.tax) === null || _155 === void 0 ? void 0 : _155.onlineGameSocial) !== null && _156 !== void 0 ? _156 : 0),
|
|
240
|
+
fuelExploration: isNil ? 0 : _round((_158 = (_157 = payload.tax) === null || _157 === void 0 ? void 0 : _157.fuelExploration) !== null && _158 !== void 0 ? _158 : 0),
|
|
241
|
+
nonAlcool: isNil ? 0 : _round((_160 = (_159 = payload.tax) === null || _159 === void 0 ? void 0 : _159.nonAlcool) !== null && _160 !== void 0 ? _160 : 0),
|
|
242
|
+
nonAlcoolWithSugar: isNil ? 0 : _round((_162 = (_161 = payload.tax) === null || _161 === void 0 ? void 0 : _161.nonAlcoolWithSugar) !== null && _162 !== void 0 ? _162 : 0),
|
|
243
|
+
nonAlcoolWithEdul: isNil ? 0 : _round((_164 = (_163 = payload.tax) === null || _163 === void 0 ? void 0 : _163.nonAlcoolWithEdul) !== null && _164 !== void 0 ? _164 : 0),
|
|
244
|
+
mineralWater: isNil ? 0 : _round((_166 = (_165 = payload.tax) === null || _165 === void 0 ? void 0 : _165.mineralWater) !== null && _166 !== void 0 ? _166 : 0),
|
|
245
|
+
numericalService: isNil ? 0 : _round((_168 = (_167 = payload.tax) === null || _167 === void 0 ? void 0 : _167.numericalService) !== null && _168 !== void 0 ? _168 : 0),
|
|
246
|
+
platform: isNil ? 0 : _round((_170 = (_169 = payload.tax) === null || _169 === void 0 ? void 0 : _169.platform) !== null && _170 !== void 0 ? _170 : 0),
|
|
247
247
|
total: 0, // Calculé plus bas
|
|
248
248
|
},
|
|
249
249
|
tic: {
|
|
@@ -262,9 +262,9 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
262
262
|
},
|
|
263
263
|
recapitulation: {
|
|
264
264
|
balance: 0,
|
|
265
|
-
refund: isNil ? 0 : _round((
|
|
266
|
-
creditToReport: isNil ? 0 : _round((
|
|
267
|
-
imputedCredit: isNil ? 0 : _round((
|
|
265
|
+
refund: isNil ? 0 : _round((_172 = (_171 = payload.refund) === null || _171 === void 0 ? void 0 : _171.asked) !== null && _172 !== void 0 ? _172 : 0),
|
|
266
|
+
creditToReport: isNil ? 0 : _round((_174 = (_173 = payload.deductible) === null || _173 === void 0 ? void 0 : _173.previousCredit) !== null && _174 !== void 0 ? _174 : 0),
|
|
267
|
+
imputedCredit: isNil ? 0 : _round((_176 = (_175 = payload.recapitulation) === null || _175 === void 0 ? void 0 : _175.imputedCredit) !== null && _176 !== void 0 ? _176 : 0),
|
|
268
268
|
ticRefunded: 0,
|
|
269
269
|
imputeOnVat: 0,
|
|
270
270
|
vatNetDue: 0,
|
|
@@ -278,20 +278,20 @@ export function getCerfa3517Century23Payload(accountingEntries, payload) {
|
|
|
278
278
|
},
|
|
279
279
|
total: 0,
|
|
280
280
|
refund: {
|
|
281
|
-
creditRefundable: shouldFillRefund ? isNil ? 0 : _round((
|
|
281
|
+
creditRefundable: shouldFillRefund ? isNil ? 0 : _round((_178 = (_177 = payload.refund) === null || _177 === void 0 ? void 0 : _177.creditRefundable) !== null && _178 !== void 0 ? _178 : 0) : 0,
|
|
282
282
|
surplus: 0,
|
|
283
283
|
maximum: 0,
|
|
284
|
-
asked: isNil ? 0 : _round((
|
|
284
|
+
asked: isNil ? 0 : _round((_180 = (_179 = payload.refund) === null || _179 === void 0 ? void 0 : _179.asked) !== null && _180 !== void 0 ? _180 : 0),
|
|
285
285
|
reportable: 0,
|
|
286
286
|
place: shouldFillRefund ? payload.society.city : null,
|
|
287
287
|
date: shouldFillRefund ? dayjs().format('YYYY-MM-DD') : null,
|
|
288
288
|
shouldCredit: true,
|
|
289
289
|
shouldImpute: false,
|
|
290
|
-
name: shouldFillRefund ? `${(
|
|
290
|
+
name: shouldFillRefund ? `${(_181 = payload.owner) === null || _181 === void 0 ? void 0 : _181.firstname} ${(_182 = payload.owner) === null || _182 === void 0 ? void 0 : _182.lastname}` : null,
|
|
291
291
|
},
|
|
292
292
|
bankAccount: {
|
|
293
|
-
iban: (
|
|
294
|
-
bic: (
|
|
293
|
+
iban: (_184 = (_183 = payload.details) === null || _183 === void 0 ? void 0 : _183.iban) !== null && _184 !== void 0 ? _184 : null,
|
|
294
|
+
bic: (_186 = (_185 = payload.details) === null || _185 === void 0 ? void 0 : _185.bic) !== null && _186 !== void 0 ? _186 : null,
|
|
295
295
|
},
|
|
296
296
|
};
|
|
297
297
|
data.vat.total.tax = data.vat.normalRate20.tax + data.vat.normalRate20OnPetrol.tax + data.vat.reduceRate5Dot5.tax + data.vat.reduceRate10.tax + data.vat.reduceRate8Dot5.tax + data.vat.reduceRate2Dot1.tax + data.vat.particularRate.tax + data.vat.reducedRateOnPetrol.tax + data.vat.oldRate.tax + data.vat.energyBought.tax + data.vat.prestation.tax + data.vat.prestation2.tax + data.vat.saleOfImmobilization.tax + data.vat.ownDelivery.tax + data.vat.other.tax;
|