Résumé
Manipulation de l'entité ProductstockTransferToReceive (Bons de transfert à recevoir par le technicien) en lecture/écriture/suppression via un objet métier depuis une application externe.
Tables
Les tables utilisées sont :
...
sw_data_productstocktransfertoreceivedetail : Table des mouvements de bons de transfert à recevoir
sw_data_productstocktransfertoreceivedetaildetail : Table des détails de mouvements de bons de transfert à recevoir
Critères d'activation
WHK_Transfer2Receive est défini dans la gestion des webhooks du studio.
Règles métier
verb: PUT
Un bon de transfert dont le statut est 'Traité' (generictype_ID_status = TREATED) ne peut plus être modifié
Le type de transfert est mis par défaut à 'Réapprovisionnement' (generictype_ID_transferType = PRODUCTSTOCK_TRANSFERTORECEIVE_TRANSFERTYPE-REPLENISHMENT) si non fourni lors d'une création
Le statut est mis par défaut à 'A traiter' (generictype_ID_status = PRODUCTSTOCK_TRANSFERTORECEIVE_STATUS-TO_BE_TREATED) si non fourni lors d'une création
...
Un bon de transfert dont le statut est 'Traité' (generictype_ID_status = TREATED) ou 'Partiellement traité' (generictype_ID_status = PARTIALLY_TREATED) ne peut plus être supprimé
Fonctionnement
verb: GET
resultType: simple
...
Bloc de code | ||
---|---|---|
| ||
{ "productstocktransfertoreceiveheader": { "codeproductstocktransfertoreceiveheader": "11", /* Code globalement unique de l'entête du bon de transfertà recevoir (Varchar (255))*/ "transferDate": "2021-09-02", /* Date du bon de transfert (DateTime ())*/ "productdepot_ID_origin": "PRINC", /* Code dépôt d'origine (ForeignKey () - sw_data_productdepot.codeproductdepot)*/ "productdepot_ID_destination": "D-95", /* Code dépôt de destination (ForeignKey () - sw_data_productdepot.codeproductdepot)*/ "totalQuantity": "10.23", /* Quantité totale (Double)*/ "externalID": " 11 I0000000 I3IF", /* Code externe (Varchar (255))*/ "externalDocumentNumber": "TRF 11", /* N° de document externe (Varchar (255))*/ "carrier": "HEPPNER", /* Transporteur (Varchar (255))*/ "trackingID": "123456789-abcd-0000000001" /* N° de suivi (Varchar (255))*/ }, "productstocktransfertoreceivedetail": [ { "codeproductstocktransfertoreceivedetail": "11-1", /* Code globalement unique d'un mouvement de bon de transfert. Composé : codeproductstocktransfertoreceiveheader + "-" + codeproductstocktransfertoreceivedetail (Varchar(255))*/ "productstocktransfertoreceiveheader_ID" : "11", /* Code bon de transfert. ReprendreOptionnel : reprendre le code bon de transfert transfertdudu bloc json "productstocktransfertoreceiveheader", si non fourni reprend automatiquement le code bon de transfert (ForeignKey () - sw_data_productstocktransfertoreceiveheader.codeproductstocktransfertoreceiveheader)*/ "lineNumber": "1", /* Numéro de ligne (Int)*/ "product_ID": "ALB0001", /* Code de l'article (ForeignKey () - sw_data_product.codeproduct)*/ "quantity": "2", /* Quantité (Double)*/ "productstockmovementtype_ID": "IO", /* Code type de mouvement (ForeignKey () - sw_data_productstockmovementtype.codeproductstockmovementtype)*/ "deal_ID": "EMB_001-0", /* Code affaire (ForeignKey () - sw_data_deal.codedeal)*/ "dealelement_ID": "EMB_001-0-55", /* Code élément d'affaire (ForeignKey () - sw_data_dealelement.codedealelement)*/ "intervention_ID": "INFDTR-10000070-2-538", /* Code intervention (ForeignKey () - sw_data_intervention.codeintervention)*/ "externalID": "54879" /* Code externe (Varchar (255))*/ }, { "codeproductstocktransfertoreceivedetail": "11-2", "productstocktransfertoreceiveheader_ID" : "11", "lineNumber": "2", "product_ID": "COC0001", "quantity": "3", "productstockmovementtype_ID": "IO", "deal_ID": "EMB_001-0", "dealelement_ID": "EMB_001-0-55", "intervention_ID": "INFDTR-10000070-2-538", "externalID": "54880" }, { "codeproductstocktransfertoreceivedetail": "11-3", "productstocktransfertoreceiveheader_ID" : "11", "lineNumber": "3", "product_ID": "TSHIRTH_L_GREEN_R", "quantity": "1", "productstockmovementtype_ID": "IO", "deal_ID": "EMB_001-0-55", "dealelement_ID": "EMB_001-0-55", "intervention_ID": "INFDTR-10000070-2-538", "externalID": "54881" }], "productstocktransfertoreceivedetaildetail": [ { "codeproductstocktransfertoreceivedetaildetail": "11-2-1", /* Code globalement unique d'un détail de mouvement de bon de transfert. Composé : codeproductstocktransfertoreceiveheader + "-" + codeproductstocktransfertoreceivedetail + "-" + codeproductstocktransfertoreceivedetaildetail (Varchar(255))*/ "productstocktransfertoreceivedetail_ID": "11-2", /* Code mouvement bon de transfert. Reprendre le code mouvement bon de transfert du bloc json "productstocktransfertoreceivedetail" (ForeignKey () - sw_data_productstocktransfertoreceivedetail.codeproductstocktransfertoreceivedetail)*/ "quantity": "1", /* Quantité (Double)*/ "productstockqualification_ID": "NORMAL", /* Code qualification de stock (ForeignKey () - sw_data_productstockqualification.codeproductstockqualification)*/ "batchSerialNumber": "9999999999999-00000001", /* N° de série/lot (Varchar (255))*/ "shelfLife": "", /* DLC (DateTime ())*/ "externalID": "123568" /* Code externe (Varchar (255))*/ }, { "codeproductstocktransfertoreceivedetaildetail": "11-2-2", "productstocktransfertoreceivedetail_ID": "11-2", "quantity": "1", "productstockqualification_ID": "NORMAL", "batchSerialNumber": "9999999999999-00000002", "shelfLife": "", "externalID": "123569" }, { "codeproductstocktransfertoreceivedetaildetail": "11-2-3", "productstocktransfertoreceivedetail_ID": "11-2", "quantity": "1", "productstockqualification_ID": "NORMAL", "batchSerialNumber": "9999999999999-00000003", "shelfLife": "", "externalID": "123570" }, { "codeproductstocktransfertoreceivedetaildetail": "11-3-1", "productstocktransfertoreceivedetail_ID": "11-3", "quantity": "1", "productstockqualification_ID": "USED", "batchSerialNumber": "", "shelfLife": "", "externalID": "123580" }] } |
...