Payment
Payment
Description
L'entitĂ© payment porte les informations de paiement sĂ©lectionnĂ©es sur l'OAV. Un ou plusieurs paiements peuvent ĂȘtre dĂ©finis sur l'OAV.
Relations
Ascendantes
Entité | Propriété |
|---|---|
Pack | payments |
Descendantes
Entité | Propriété |
|---|---|
History | history |
Relation | issuer |
PaymentMethod | paymentMethods |
Relation | relations |
Liste des propriétés
Nom | Type | DerniÚre version modifiée | Description | Getter | Setter | Deprecated |
|---|---|---|---|---|---|---|
amount | Number | 2.7.0 | Montant du paiement | getPaymentAmount | setPaymentAmount | - |
createdAt | Date | ï»ż | Date de crĂ©ation de l'entitĂ© Payment | getPaymentCreatedAt | Lecture seule | - |
createdBy | String | ï»ż | Utilisateur Ă l'origine de la crĂ©ation de l'entitĂ© Payment | getPaymentCreatedBy | Lecture seule | - |
fiscalType | FiscalTypeEnum | 2.7.0 | Type de fiscalité | getPaymentFiscalType | setPaymentFiscalType | - |
id | String | ï»ż | Identifiant unique de l'entitĂ© Payment | getPaymentId | Lecture seule | - |
updatedAt | Date | ï»ż | Date de modification de l'entitĂ© Payment | getPaymentUpdatedAt | Lecture seule | - |
updatedBy | String | ï»ż | Utilisateur Ă l'origine de la modification de l'entitĂ© Payment | getPaymentUpdatedBy | Lecture seule | - |
Enums
FiscalTypeEnum
- FiscalTypeEnum.82DISPO
- FiscalTypeEnum.82NODISP
- FiscalTypeEnum.ART39
- FiscalTypeEnum.ART39IFC
- FiscalTypeEnum.ART39IFCIL
- FiscalTypeEnum.ART39RA
- FiscalTypeEnum.ART82
- FiscalTypeEnum.ART83
- FiscalTypeEnum.ASSVIE
- FiscalTypeEnum.ASSVIE62
- FiscalTypeEnum.ASSVIE62PEP
- FiscalTypeEnum.ASSVIEPEP
- FiscalTypeEnum.CTRCAPI
- FiscalTypeEnum.EPARHAND
- FiscalTypeEnum.EPARRETR
- FiscalTypeEnum.EXPATR
- FiscalTypeEnum.FINCARR
- FiscalTypeEnum.FISCDSK
- FiscalTypeEnum.FISCLAS
- FiscalTypeEnum.FISCPRIMA
- FiscalTypeEnum.FISCMAD
- FiscalTypeEnum.FISCMAD62
- FiscalTypeEnum.FISCMADA
- FiscalTypeEnum.FISCMADA62
- FiscalTypeEnum.PACTE
- FiscalTypeEnum.PEA
- FiscalTypeEnum.PEAPE
- FiscalTypeEnum.PEE
- FiscalTypeEnum.PEP
- FiscalTypeEnum.PEPEU
- FiscalTypeEnum.PEPUC
- FiscalTypeEnum.PER
- FiscalTypeEnum.PERCO
- FiscalTypeEnum.PERE
- FiscalTypeEnum.PERI154B
- FiscalTypeEnum.PERI154BOA
- FiscalTypeEnum.PERI163Q
- FiscalTypeEnum.PERIVRSTNDEC
- FiscalTypeEnum.PERP
- FiscalTypeEnum.RENTE
- FiscalTypeEnum.VIEGEN
Exemple
import { Entities } from '@fasstech/oip-core';
import { getOfferId } from '@fasstech/oip-core/entities/offer';
import { getPackId } from '@fasstech/oip-core/entities/pack';
import { getPaymentAmount, getPaymentFiscalType, getpaymentId, setPaymentAmount, setPaymentFiscalType } from '@fasstech/oip-core/entities/payment';
import { FiscalTypeEnum } from '@fasstech/oip-core/entities/payment/enums';
import { getProjectId } from '@fasstech/oip-core/entities/project';
(async () => {
let ProjectEntity = await Entities('Project').get({ id: projectId });
let OfferEntity = await Entities('Offer').create();
let PackEntity = await Entities('Pack').create();
const PaymentEntity = await Entities('Payment').create();
setPaymentAmount(97, PaymentEntity);
setPaymentFiscalType(FiscalTypeEnum.FISCMAD62, PaymentEntity);
PackEntity = await Entities('Payment').save(PackEntity, PaymentEntity);
OfferEntity = await Entities('Pack').save(OfferEntity, PackEntity);
ProjectEntity = await Entities('Offer').save(ProjectEntity, OfferEntity);
await Entities('Project').save(ProjectEntity);
const ProjectEntityToTest = await Entities('Project').get({ id: getProjectId(ProjectEntity) });
const OfferEntityToTest = await Entities('Offer').get(ProjectEntityToTest, getOfferId(OfferEntity));
const PackEntityToTest = await Entities('Pack').get(OfferEntityToTest, getPackId(PackEntity));
const PaymentEntityToTest = await Entities('Payment').get(PackEntityToTest, getPaymentId(PaymentEntity));
getPaymentAmount(PaymentEntityToTest); // 97
getPaymentFiscalType(PaymentEntityToTest); // FiscalTypeEnum.FISCMAD62
})();