Bienvenido a los foros %s

Foro comunidad hispana Dolibarr

Identificarse Registrarse

Error al actualizar la nota privada y pública de un invoice. Dolibarr 20.0.x a 20.0.2

Si cree que ha encontrado un error en una versión estable, siéntase libre de comunicarlo aquí, indicando la versión.
leontic
Novato
Mensajes: 3
Registrado: Mar, 30/05/2023, 12:20

Error al actualizar la nota privada y pública de un invoice. Dolibarr 20.0.x a 20.0.2

Mensaje por leontic »

Problema detectado en la API de Dolibarr 20.0.2: Actualización de notas en facturas
Contexto
En la versión 20 de Dolibarr, hemos detectado un problema al actualizar las notas (pública y privada) de una factura a través de la API utilizando la ruta PUT /invoice/{id}. Este comportamiento difiere respecto a la versión anterior, donde esta funcionalidad operaba correctamente.

Descripción del problema
Escenario de uso:

Se intenta actualizar las notas pública y privada de una factura mediante una solicitud HTTP PUT hacia la API en la ruta PUT /invoice/{id}.
El payload enviado contiene el campo correspondiente a las notas, por ejemplo:
json
Copiar código

Código: Seleccionar todo

{
  "fk_user_author": "10",
  "fk_user_valid": "10",
  "fk_user_modif": "1",
  "datem": 1732790063,
  "delivery_date": null,
  "ref_client": null,
  "ref_customer": null,
  "total_ht": "112.00000000",
  "total_tva": "23.52000000",
  "total_localtax1": "0.00000000",
  "total_localtax2": "0.00000000",
  "total_ttc": "135.52000000",
  "revenuestamp": "0.00000000",
  "resteapayer": null,
  "paye": "0",
  "module_source": null,
  "pos_source": null,
  "fk_fac_rec_source": null,
  "fk_facture_source": null,
  "lines": [
    {
      "fk_facture": "965",
      "fk_parent_line": null,
      "desc": "",
      "ref_ext": "",
      "localtax1_type": "3",
      "localtax2_type": "1",
      "fk_remise_except": null,
      "rang": "0",
      "fk_fournprice": null,
      "pa_ht": "0.00000000",
      "marge_tx": "",
      "marque_tx": 100,
      "tva_npr": null,
      "remise_percent": "20",
      "batch": "",
      "fk_warehouse": "0",
      "origin_id": null,
      "fk_code_ventilation": 0,
      "date_start": "",
      "date_end": "",
      "situation_percent": "100",
      "fk_prev_id": null,
      "label": null,
      "ref": "P-3",
      "libelle": "Producto P3",
      "product_type": "0",
      "product_ref": "P-3",
      "product_label": "Producto P3",
      "product_desc": "",
      "qty": "1",
      "subprice": "110.00000000",
      "price": null,
      "fk_product": "16",
      "vat_src_code": "",
      "tva_tx": "21.000",
      "localtax1_tx": "0.000",
      "localtax2_tx": "0.000",
      "remise": null,
      "total_ht": "88.00000000",
      "total_tva": "18.48000000",
      "total_localtax1": "0.00000000",
      "total_localtax2": "0.00000000",
      "total_ttc": "106.48000000",
      "date_start_fill": null,
      "date_end_fill": null,
      "buy_price_ht": null,
      "buyprice": null,
      "info_bits": "0",
      "special_code": "0",
      "fk_user_author": null,
      "fk_user_modif": null,
      "fk_accounting_account": "0",
      "parent_element": "",
      "fk_parent_attribute": "",
      "id": "1581",
      "rowid": "1581",
      "fk_unit": null,
      "date_debut_prevue": null,
      "date_debut_reel": null,
      "date_fin_prevue": null,
      "date_fin_reel": null,
      "weight": null,
      "weight_units": null,
      "width": null,
      "width_units": null,
      "height": null,
      "height_units": null,
      "length": null,
      "length_units": null,
      "surface": null,
      "surface_units": null,
      "volume": null,
      "volume_units": null,
      "multilangs": null,
      "description": "",
      "product": null,
      "product_barcode": null,
      "fk_product_type": "0",
      "duree": null,
      "multicurrency_subprice": "110.00000000",
      "multicurrency_total_ht": "88.00000000",
      "multicurrency_total_tva": "18.48000000",
      "multicurrency_total_ttc": "106.48000000",
      "module": null,
      "entity": null,
      "import_key": null,
      "array_options": [],
      "array_languages": null,
      "contacts_ids": null,
      "linkedObjectsIds": null,
      "origin_type": null,
      "statut": null,
      "status": null,
      "state_id": null,
      "region_id": null,
      "demand_reason_id": null,
      "transport_mode_id": null,
      "shipping_method": null,
      "multicurrency_tx": null,
      "multicurrency_total_localtax1": null,
      "multicurrency_total_localtax2": null,
      "last_main_doc": null,
      "fk_account": null,
      "lines": null,
      "actiontypecode": null,
      "date_creation": null,
      "date_validation": null,
      "date_modification": null,
      "tms": null,
      "date_cloture": null,
      "user_author": null,
      "user_creation": null,
      "user_creation_id": null,
      "user_valid": null,
      "user_validation": null,
      "user_validation_id": null,
      "user_closing_id": null,
      "user_modification": null,
      "user_modification_id": null,
      "fk_user_creat": null,
      "specimen": 0,
      "extraparams": [],
      "cond_reglement_supplier_id": null,
      "deposit_percent": null,
      "retained_warranty_fk_cond_reglement": null,
      "warehouse_id": null
    },
    {
      "fk_facture": "965",
      "fk_parent_line": null,
      "desc": "",
      "ref_ext": "",
      "localtax1_type": "3",
      "localtax2_type": "1",
      "fk_remise_except": null,
      "rang": "0",
      "fk_fournprice": null,
      "pa_ht": "0.00000000",
      "marge_tx": "",
      "marque_tx": 100,
      "tva_npr": null,
      "remise_percent": "20",
      "batch": "",
      "fk_warehouse": "0",
      "origin_id": null,
      "fk_code_ventilation": 0,
      "date_start": 1730329200,
      "date_end": 1761865200,
      "situation_percent": "100",
      "fk_prev_id": null,
      "label": null,
      "ref": "S-3P1",
      "libelle": "Suscripción 3P1",
      "product_type": "1",
      "product_ref": "S-3P1",
      "product_label": "Suscripción 3P1",
      "product_desc": "",
      "qty": "1",
      "subprice": "30.00000000",
      "price": null,
      "fk_product": "90",
      "vat_src_code": "",
      "tva_tx": "21.000",
      "localtax1_tx": "0.000",
      "localtax2_tx": "0.000",
      "remise": null,
      "total_ht": "24.00000000",
      "total_tva": "5.04000000",
      "total_localtax1": "0.00000000",
      "total_localtax2": "0.00000000",
      "total_ttc": "29.04000000",
      "date_start_fill": null,
      "date_end_fill": null,
      "buy_price_ht": null,
      "buyprice": null,
      "info_bits": "0",
      "special_code": "0",
      "fk_user_author": null,
      "fk_user_modif": null,
      "fk_accounting_account": "0",
      "parent_element": "",
      "fk_parent_attribute": "",
      "id": "1582",
      "rowid": "1582",
      "fk_unit": null,
      "date_debut_prevue": null,
      "date_debut_reel": null,
      "date_fin_prevue": null,
      "date_fin_reel": null,
      "weight": null,
      "weight_units": null,
      "width": null,
      "width_units": null,
      "height": null,
      "height_units": null,
      "length": null,
      "length_units": null,
      "surface": null,
      "surface_units": null,
      "volume": null,
      "volume_units": null,
      "multilangs": null,
      "description": "",
      "product": null,
      "product_barcode": null,
      "fk_product_type": "1",
      "duree": null,
      "multicurrency_subprice": "30.00000000",
      "multicurrency_total_ht": "24.00000000",
      "multicurrency_total_tva": "5.04000000",
      "multicurrency_total_ttc": "29.04000000",
      "module": null,
      "entity": null,
      "import_key": null,
      "array_options": [],
      "array_languages": null,
      "contacts_ids": null,
      "linkedObjectsIds": null,
      "origin_type": null,
      "statut": null,
      "status": null,
      "state_id": null,
      "region_id": null,
      "demand_reason_id": null,
      "transport_mode_id": null,
      "shipping_method": null,
      "multicurrency_tx": null,
      "multicurrency_total_localtax1": null,
      "multicurrency_total_localtax2": null,
      "last_main_doc": null,
      "fk_account": null,
      "lines": null,
      "actiontypecode": null,
      "date_creation": null,
      "date_validation": null,
      "date_modification": null,
      "tms": null,
      "date_cloture": null,
      "user_author": null,
      "user_creation": null,
      "user_creation_id": null,
      "user_valid": null,
      "user_validation": null,
      "user_validation_id": null,
      "user_closing_id": null,
      "user_modification": null,
      "user_modification_id": null,
      "fk_user_creat": null,
      "specimen": 0,
      "extraparams": [],
      "cond_reglement_supplier_id": null,
      "deposit_percent": null,
      "retained_warranty_fk_cond_reglement": null,
      "warehouse_id": null
    }
  ],
  "line": null,
  "extraparams": [],
  "fac_rec": null,
  "date_pointoftax": "",
  "situation_cycle_ref": null,
  "situation_counter": null,
  "situation_final": "0",
  "tab_previous_situation_invoice": [],
  "tab_next_situation_invoice": [],
  "retained_warranty": "0",
  "retained_warranty_date_limit": "",
  "retained_warranty_fk_cond_reglement": "0",
  "availability_id": null,
  "date_closing": null,
  "source": null,
  "remise_percent": null,
  "online_payment_url": "https://leontic.com/zxdemo/public/payment/newpayment.php?source=invoice&ref=FA2410-0023",
  "title": null,
  "type": "0",
  "subtype": null,
  "fk_soc": null,
  "socid": "22",
  "date": 1730329200,
  "date_lim_reglement": 1730329200,
  "cond_reglement_id": "1",
  "cond_reglement_code": "RECEP",
  "cond_reglement_label": null,
  "cond_reglement_doc": "Réception de facture",
  "mode_reglement_id": "3",
  "mode_reglement_code": "PRE",
  "totaldeposits": null,
  "totalcreditnotes": null,
  "sumpayed": null,
  "sumpayed_multicurrency": null,
  "sumdeposit": null,
  "sumdeposit_multicurrency": null,
  "sumcreditnote": null,
  "sumcreditnote_multicurrency": null,
  "remaintopay": "135.52",
  "stripechargedone": null,
  "stripechargeerror": null,
  "description": null,
  "close_code": null,
  "close_note": null,
  "postactionmessages": null,
  "module": null,
  "id": "965",
  "entity": "1",
  "import_key": null,
  "array_options": [],
  "array_languages": null,
  "contacts_ids": [],
  "linkedObjectsIds": {
    "commande": {
      "1397": "768"
    }
  },
  "fk_project": null,
  "contact_id": null,
  "user": null,
  "origin_type": null,
  "origin_id": null,
  "ref": "FA2410-0023",
  "ref_ext": null,
  "statut": "1",
  "status": "1",
  "country_id": null,
  "country_code": null,
  "state_id": null,
  "region_id": null,
  "demand_reason_id": null,
  "transport_mode_id": null,
  "shipping_method_id": null,
  "shipping_method": null,
  "fk_multicurrency": "0",
  "multicurrency_code": "EUR",
  "multicurrency_tx": "1.00000000",
  "multicurrency_total_ht": "112.00000000",
  "multicurrency_total_tva": "23.52000000",
  "multicurrency_total_ttc": "135.52000000",
  "multicurrency_total_localtax1": null,
  "multicurrency_total_localtax2": null,
  "last_main_doc": "facture/FA2410-0023/FA2410-0023.pdf",
  "fk_account": null,
  "note_public": "NEW tooo PUBLIC",
  "note_private": "NEW tooo PRIVATE",
  "actiontypecode": null,
  "name": null,
  "lastname": null,
  "firstname": null,
  "civility_id": null,
  "date_creation": 1730371423,
  "date_validation": 1730371423,
  "date_modification": 1732790063,
  "tms": null,
  "date_cloture": null,
  "user_author": null,
  "user_creation": null,
  "user_creation_id": "10",
  "user_valid": null,
  "user_validation": null,
  "user_validation_id": "10",
  "user_closing_id": null,
  "user_modification": null,
  "user_modification_id": "1",
  "fk_user_creat": null,
  "specimen": 0,
  "product": null,
  "cond_reglement_supplier_id": null,
  "deposit_percent": null,
  "warehouse_id": null,
  "fk_incoterms": "0",
  "label_incoterms": null,
  "location_incoterms": ""
}
Si enviamos solamente este JSON funciona bien

Código: Seleccionar todo

{
    "note_public": "Nota pública actualizada",
    "note_private": "Nota privada actualizada"
}


Comportamiento observado:

La solicitud es aceptada (código HTTP 200), pero las notas no se actualizan en la base de datos al enviar toda la factura entera.
Este problema ocurre únicamente desde la API.
Comportamiento esperado:

Las notas deberían actualizarse correctamente, como sucedía en la versión previa
Desde la interfaz web:
La funcionalidad opera correctamente. Las notas se actualizan sin inconvenientes desde la interfaz web.
Última edición por leontic el Jue, 28/11/2024, 13:01, editado 2 veces en total.

Avatar de Usuario
ferran
Jedi
Mensajes: 546
Registrado: Vie, 18/01/2013, 16:31
Ubicación: Gandia, Valencia

Mensaje por ferran »

Hola,

he probado desde el explorador de la API de Dolibarr y ha funcionado bien al actualizar las notas de la factura. Por si te sirve de algo, este es el comando curl que ejecuta internamente

curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'DOLAPIKEY: 25e04b40fa4b28df2d2872628c164194746f06da' -d '{ \
"note_public": "Nota pública actualizada", \
"note_private": "Nota privada actualizada" \
}' 'http://localhost/dolibarr/htdocs/api/in ... voices/245'

Un saludo.
2byte.es Preferred Partner de Dolibarr.
¿Quieres soporte profesional? Contacta con nosotros

leontic
Novato
Mensajes: 3
Registrado: Mar, 30/05/2023, 12:20

Mensaje por leontic »

Hola Ferran.

Muchas gracias por contestar.

Tienes razón si paso solo los campos de notas funciona bien

Código: Seleccionar todo

{
   "note_public": "NEW PUBLIC",  
   "note_private": "NEW PRIVATE",  
}
Pero si paso toda la factura entera, por ejemplo:

Código: Seleccionar todo

curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'DOLAPIKEY: ************************' -d '{ \ 
   "fk_user_author": "10", \ 
   "fk_user_valid": "10", \ 
   "fk_user_modif": "1", \ 
   "datem": 1732790063, \ 
   "delivery_date": null, \ 
   "ref_client": null, \ 
   "ref_customer": null, \ 
   "total_ht": "112.00000000", \ 
   "total_tva": "23.52000000", \ 
   "total_localtax1": "0.00000000", \ 
   "total_localtax2": "0.00000000", \ 
   "total_ttc": "135.52000000", \ 
   "revenuestamp": "0.00000000", \ 
   "resteapayer": null, \ 
   "paye": "0", \ 
   "module_source": null, \ 
   "pos_source": null, \ 
   "fk_fac_rec_source": null, \ 
   "fk_facture_source": null, \ 
   "lines": [ \ 
     { \ 
       "fk_facture": "965", \ 
       "fk_parent_line": null, \ 
       "desc": "", \ 
       "ref_ext": "", \ 
       "localtax1_type": "3", \ 
       "localtax2_type": "1", \ 
       "fk_remise_except": null, \ 
       "rang": "0", \ 
       "fk_fournprice": null, \ 
       "pa_ht": "0.00000000", \ 
       "marge_tx": "", \ 
       "marque_tx": 100, \ 
       "tva_npr": null, \ 
       "remise_percent": "20", \ 
       "batch": "", \ 
       "fk_warehouse": "0", \ 
       "origin_id": null, \ 
       "fk_code_ventilation": 0, \ 
       "date_start": "", \ 
       "date_end": "", \ 
       "situation_percent": "100", \ 
       "fk_prev_id": null, \ 
       "label": null, \ 
       "ref": "P-3", \ 
       "libelle": "**************************", \ 
       "product_type": "0", \ 
       "product_ref": "P-3", \ 
       "product_label": "**********************", \ 
       "product_desc": "", \ 
       "qty": "1", \ 
       "subprice": "110.00000000", \ 
       "price": null, \ 
       "fk_product": "16", \ 
       "vat_src_code": "", \ 
       "tva_tx": "21.000", \ 
       "localtax1_tx": "0.000", \ 
       "localtax2_tx": "0.000", \ 
       "remise": null, \ 
       "total_ht": "88.00000000", \ 
       "total_tva": "18.48000000", \ 
       "total_localtax1": "0.00000000", \ 
       "total_localtax2": "0.00000000", \ 
       "total_ttc": "106.48000000", \ 
       "date_start_fill": null, \ 
       "date_end_fill": null, \ 
       "buy_price_ht": null, \ 
       "buyprice": null, \ 
       "info_bits": "0", \ 
       "special_code": "0", \ 
       "fk_user_author": null, \ 
       "fk_user_modif": null, \ 
       "fk_accounting_account": "0", \ 
       "parent_element": "", \ 
       "fk_parent_attribute": "", \ 
       "id": "1581", \ 
       "rowid": "1581", \ 
       "fk_unit": null, \ 
       "date_debut_prevue": null, \ 
       "date_debut_reel": null, \ 
       "date_fin_prevue": null, \ 
       "date_fin_reel": null, \ 
       "weight": null, \ 
       "weight_units": null, \ 
       "width": null, \ 
       "width_units": null, \ 
       "height": null, \ 
       "height_units": null, \ 
       "length": null, \ 
       "length_units": null, \ 
       "surface": null, \ 
       "surface_units": null, \ 
       "volume": null, \ 
       "volume_units": null, \ 
       "multilangs": null, \ 
       "description": "", \ 
       "product": null, \ 
       "product_barcode": null, \ 
       "fk_product_type": "0", \ 
       "duree": null, \ 
       "multicurrency_subprice": "110.00000000", \ 
       "multicurrency_total_ht": "88.00000000", \ 
       "multicurrency_total_tva": "18.48000000", \ 
       "multicurrency_total_ttc": "106.48000000", \ 
       "module": null, \ 
       "entity": null, \ 
       "import_key": null, \ 
       "array_options": [], \ 
       "array_languages": null, \ 
       "contacts_ids": null, \ 
       "linkedObjectsIds": null, \ 
       "origin_type": null, \ 
       "statut": null, \ 
       "status": null, \ 
       "state_id": null, \ 
       "region_id": null, \ 
       "demand_reason_id": null, \ 
       "transport_mode_id": null, \ 
       "shipping_method": null, \ 
       "multicurrency_tx": null, \ 
       "multicurrency_total_localtax1": null, \ 
       "multicurrency_total_localtax2": null, \ 
       "last_main_doc": null, \ 
       "fk_account": null, \ 
       "lines": null, \ 
       "actiontypecode": null, \ 
       "date_creation": null, \ 
       "date_validation": null, \ 
       "date_modification": null, \ 
       "tms": null, \ 
       "date_cloture": null, \ 
       "user_author": null, \ 
       "user_creation": null, \ 
       "user_creation_id": null, \ 
       "user_valid": null, \ 
       "user_validation": null, \ 
       "user_validation_id": null, \ 
       "user_closing_id": null, \ 
       "user_modification": null, \ 
       "user_modification_id": null, \ 
       "fk_user_creat": null, \ 
       "specimen": 0, \ 
       "extraparams": [], \ 
       "cond_reglement_supplier_id": null, \ 
       "deposit_percent": null, \ 
       "retained_warranty_fk_cond_reglement": null, \ 
       "warehouse_id": null \ 
     }, \ 
     { \ 
       "fk_facture": "965", \ 
       "fk_parent_line": null, \ 
       "desc": "", \ 
       "ref_ext": "", \ 
       "localtax1_type": "3", \ 
       "localtax2_type": "1", \ 
       "fk_remise_except": null, \ 
       "rang": "0", \ 
       "fk_fournprice": null, \ 
       "pa_ht": "0.00000000", \ 
       "marge_tx": "", \ 
       "marque_tx": 100, \ 
       "tva_npr": null, \ 
       "remise_percent": "20", \ 
       "batch": "", \ 
       "fk_warehouse": "0", \ 
       "origin_id": null, \ 
       "fk_code_ventilation": 0, \ 
       "date_start": 1730329200, \ 
       "date_end": 1761865200, \ 
       "situation_percent": "100", \ 
       "fk_prev_id": null, \ 
       "label": null, \ 
       "ref": "S-3P1", \ 
       "libelle": "************************", \ 
       "product_type": "1", \ 
       "product_ref": "S-3P1", \ 
       "product_label": "********************", \ 
       "product_desc": "", \ 
       "qty": "1", \ 
       "subprice": "30.00000000", \ 
       "price": null, \ 
       "fk_product": "90", \ 
       "vat_src_code": "", \ 
       "tva_tx": "21.000", \ 
       "localtax1_tx": "0.000", \ 
       "localtax2_tx": "0.000", \ 
       "remise": null, \ 
       "total_ht": "24.00000000", \ 
       "total_tva": "5.04000000", \ 
       "total_localtax1": "0.00000000", \ 
       "total_localtax2": "0.00000000", \ 
       "total_ttc": "29.04000000", \ 
       "date_start_fill": null, \ 
       "date_end_fill": null, \ 
       "buy_price_ht": null, \ 
       "buyprice": null, \ 
       "info_bits": "0", \ 
       "special_code": "0", \ 
       "fk_user_author": null, \ 
       "fk_user_modif": null, \ 
       "fk_accounting_account": "0", \ 
       "parent_element": "", \ 
       "fk_parent_attribute": "", \ 
       "id": "1582", \ 
       "rowid": "1582", \ 
       "fk_unit": null, \ 
       "date_debut_prevue": null, \ 
       "date_debut_reel": null, \ 
       "date_fin_prevue": null, \ 
       "date_fin_reel": null, \ 
       "weight": null, \ 
       "weight_units": null, \ 
       "width": null, \ 
       "width_units": null, \ 
       "height": null, \ 
       "height_units": null, \ 
       "length": null, \ 
       "length_units": null, \ 
       "surface": null, \ 
       "surface_units": null, \ 
       "volume": null, \ 
       "volume_units": null, \ 
       "multilangs": null, \ 
       "description": "", \ 
       "product": null, \ 
       "product_barcode": null, \ 
       "fk_product_type": "1", \ 
       "duree": null, \ 
       "multicurrency_subprice": "30.00000000", \ 
       "multicurrency_total_ht": "24.00000000", \ 
       "multicurrency_total_tva": "5.04000000", \ 
       "multicurrency_total_ttc": "29.04000000", \ 
       "module": null, \ 
       "entity": null, \ 
       "import_key": null, \ 
       "array_options": [], \ 
       "array_languages": null, \ 
       "contacts_ids": null, \ 
       "linkedObjectsIds": null, \ 
       "origin_type": null, \ 
       "statut": null, \ 
       "status": null, \ 
       "state_id": null, \ 
       "region_id": null, \ 
       "demand_reason_id": null, \ 
       "transport_mode_id": null, \ 
       "shipping_method": null, \ 
       "multicurrency_tx": null, \ 
       "multicurrency_total_localtax1": null, \ 
       "multicurrency_total_localtax2": null, \ 
       "last_main_doc": null, \ 
       "fk_account": null, \ 
       "lines": null, \ 
       "actiontypecode": null, \ 
       "date_creation": null, \ 
       "date_validation": null, \ 
       "date_modification": null, \ 
       "tms": null, \ 
       "date_cloture": null, \ 
       "user_author": null, \ 
       "user_creation": null, \ 
       "user_creation_id": null, \ 
       "user_valid": null, \ 
       "user_validation": null, \ 
       "user_validation_id": null, \ 
       "user_closing_id": null, \ 
       "user_modification": null, \ 
       "user_modification_id": null, \ 
       "fk_user_creat": null, \ 
       "specimen": 0, \ 
       "extraparams": [], \ 
       "cond_reglement_supplier_id": null, \ 
       "deposit_percent": null, \ 
       "retained_warranty_fk_cond_reglement": null, \ 
       "warehouse_id": null \ 
     } \ 
   ], \ 
   "line": null, \ 
   "extraparams": [], \ 
   "fac_rec": null, \ 
   "date_pointoftax": "", \ 
   "situation_cycle_ref": null, \ 
   "situation_counter": null, \ 
   "situation_final": "0", \ 
   "tab_previous_situation_invoice": [], \ 
   "tab_next_situation_invoice": [], \ 
   "retained_warranty": "0", \ 
   "retained_warranty_date_limit": "", \ 
   "retained_warranty_fk_cond_reglement": "0", \ 
   "availability_id": null, \ 
   "date_closing": null, \ 
   "source": null, \ 
   "remise_percent": null, \ 
   "online_payment_url": "*********ayment/newpayment.php?source=invoice%26ref=FA2410-0023", \ 
   "title": null, \ 
   "type": "0", \ 
   "subtype": null, \ 
   "fk_soc": null, \ 
   "socid": "22", \ 
   "date": 1730329200, \ 
   "date_lim_reglement": 1730329200, \ 
   "cond_reglement_id": "1", \ 
   "cond_reglement_code": "RECEP", \ 
   "cond_reglement_label": null, \ 
   "cond_reglement_doc": "Réception de facture", \ 
   "mode_reglement_id": "3", \ 
   "mode_reglement_code": "PRE", \ 
   "totaldeposits": null, \ 
   "totalcreditnotes": null, \ 
   "sumpayed": null, \ 
   "sumpayed_multicurrency": null, \ 
   "sumdeposit": null, \ 
   "sumdeposit_multicurrency": null, \ 
   "sumcreditnote": null, \ 
   "sumcreditnote_multicurrency": null, \ 
   "remaintopay": "135.52", \ 
   "stripechargedone": null, \ 
   "stripechargeerror": null, \ 
   "description": null, \ 
   "close_code": null, \ 
   "close_note": null, \ 
   "postactionmessages": null, \ 
   "module": null, \ 
   "id": "965", \ 
   "entity": "1", \ 
   "import_key": null, \ 
   "array_options": [], \ 
   "array_languages": null, \ 
   "contacts_ids": [], \ 
   "linkedObjectsIds": { \ 
     "commande": { \ 
       "1397": "768" \ 
     } \ 
   }, \ 
   "fk_project": null, \ 
   "contact_id": null, \ 
   "user": null, \ 
   "origin_type": null, \ 
   "origin_id": null, \ 
   "ref": "FA2410-0023", \ 
   "ref_ext": null, \ 
   "statut": "1", \ 
   "status": "1", \ 
   "country_id": null, \ 
   "country_code": null, \ 
   "state_id": null, \ 
   "region_id": null, \ 
   "demand_reason_id": null, \ 
   "transport_mode_id": null, \ 
   "shipping_method_id": null, \ 
   "shipping_method": null, \ 
   "fk_multicurrency": "0", \ 
   "multicurrency_code": "EUR", \ 
   "multicurrency_tx": "1.00000000", \ 
   "multicurrency_total_ht": "112.00000000", \ 
   "multicurrency_total_tva": "23.52000000", \ 
   "multicurrency_total_ttc": "135.52000000", \ 
   "multicurrency_total_localtax1": null, \ 
   "multicurrency_total_localtax2": null, \ 
   "last_main_doc": "facture/FA2410-0023/FA2410-0023.pdf", \ 
   "fk_account": null, \ 
   "note_public": "NEW tooo PUBLIC", \ 
   "note_private": "NEW tooo PRIVATE", \ 
   "actiontypecode": null, \ 
   "name": null, \ 
   "lastname": null, \ 
   "firstname": null, \ 
   "civility_id": null, \ 
   "date_creation": 1730371423, \ 
   "date_validation": 1730371423, \ 
   "date_modification": 1732790063, \ 
   "tms": null, \ 
   "date_cloture": null, \ 
   "user_author": null, \ 
   "user_creation": null, \ 
   "user_creation_id": "10", \ 
   "user_valid": null, \ 
   "user_validation": null, \ 
   "user_validation_id": "10", \ 
   "user_closing_id": null, \ 
   "user_modification": null, \ 
   "user_modification_id": "1", \ 
   "fk_user_creat": null, \ 
   "specimen": 0, \ 
   "product": null, \ 
   "cond_reglement_supplier_id": null, \ 
   "deposit_percent": null, \ 
   "warehouse_id": null, \ 
   "fk_incoterms": "0", \ 
   "label_incoterms": null, \ 
   "location_incoterms": "" \ 
 }' 
Obtengo la siguiente respuesta:

Código: Seleccionar todo

{
  "fk_user_author": "10",
  "fk_user_valid": "10",
  "fk_user_modif": "1",
  "datem": 1732790063,
  "delivery_date": "",
  "ref_client": null,
  "ref_customer": null,
  "total_ht": "112.00000000",
  "total_tva": "23.52000000",
  "total_localtax1": "0.00000000",
  "total_localtax2": "0.00000000",
  "total_ttc": "135.52000000",
  "revenuestamp": "0.00000000",
  "resteapayer": "",
  "paye": "0",
  "module_source": null,
  "pos_source": null,
  "fk_fac_rec_source": null,
  "fk_facture_source": null,
  "lines": [
    {
      "fk_facture": "965",
      "fk_parent_line": null,
      "desc": "",
      "ref_ext": "",
      "localtax1_type": "3",
      "localtax2_type": "1",
      "fk_remise_except": null,
      "rang": "0",
      "fk_fournprice": null,
      "pa_ht": "0.00000000",
      "marge_tx": "",
      "marque_tx": 100,
      "tva_npr": null,
      "remise_percent": "20",
      "batch": "",
      "fk_warehouse": "0",
      "origin_id": null,
      "fk_code_ventilation": 0,
      "date_start": "",
      "date_end": "",
      "situation_percent": "100",
      "fk_prev_id": null,
      "label": null,
      "ref": "P-3",
      "libelle": "*********************",
      "product_type": "0",
      "product_ref": "P-3",
      "product_label": "*********************",
      "product_desc": "",
      "qty": "1",
      "subprice": "110.00000000",
      "price": null,
      "fk_product": "16",
      "vat_src_code": "",
      "tva_tx": "21.000",
      "localtax1_tx": "0.000",
      "localtax2_tx": "0.000",
      "remise": null,
      "total_ht": "88.00000000",
      "total_tva": "18.48000000",
      "total_localtax1": "0.00000000",
      "total_localtax2": "0.00000000",
      "total_ttc": "106.48000000",
      "date_start_fill": null,
      "date_end_fill": null,
      "buy_price_ht": null,
      "buyprice": null,
      "info_bits": "0",
      "special_code": "0",
      "fk_user_author": null,
      "fk_user_modif": null,
      "fk_accounting_account": "0",
      "parent_element": "",
      "fk_parent_attribute": "",
      "id": "1581",
      "rowid": "1581",
      "fk_unit": null,
      "date_debut_prevue": null,
      "date_debut_reel": null,
      "date_fin_prevue": null,
      "date_fin_reel": null,
      "weight": null,
      "weight_units": null,
      "width": null,
      "width_units": null,
      "height": null,
      "height_units": null,
      "length": null,
      "length_units": null,
      "surface": null,
      "surface_units": null,
      "volume": null,
      "volume_units": null,
      "multilangs": null,
      "description": "",
      "product": null,
      "product_barcode": null,
      "fk_product_type": "0",
      "duree": null,
      "multicurrency_subprice": "110.00000000",
      "multicurrency_total_ht": "88.00000000",
      "multicurrency_total_tva": "18.48000000",
      "multicurrency_total_ttc": "106.48000000",
      "module": null,
      "entity": null,
      "import_key": null,
      "array_options": [],
      "array_languages": null,
      "contacts_ids": null,
      "linkedObjectsIds": null,
      "origin_type": null,
      "statut": null,
      "status": null,
      "state_id": null,
      "region_id": null,
      "demand_reason_id": null,
      "transport_mode_id": null,
      "shipping_method": null,
      "multicurrency_tx": null,
      "multicurrency_total_localtax1": null,
      "multicurrency_total_localtax2": null,
      "last_main_doc": null,
      "fk_account": null,
      "lines": null,
      "actiontypecode": null,
      "date_creation": null,
      "date_validation": null,
      "date_modification": null,
      "tms": null,
      "date_cloture": null,
      "user_author": null,
      "user_creation": null,
      "user_creation_id": null,
      "user_valid": null,
      "user_validation": null,
      "user_validation_id": null,
      "user_closing_id": null,
      "user_modification": null,
      "user_modification_id": null,
      "fk_user_creat": null,
      "specimen": 0,
      "extraparams": [],
      "cond_reglement_supplier_id": null,
      "deposit_percent": null,
      "retained_warranty_fk_cond_reglement": null,
      "warehouse_id": null
    },
    {
      "fk_facture": "965",
      "fk_parent_line": null,
      "desc": "",
      "ref_ext": "",
      "localtax1_type": "3",
      "localtax2_type": "1",
      "fk_remise_except": null,
      "rang": "0",
      "fk_fournprice": null,
      "pa_ht": "0.00000000",
      "marge_tx": "",
      "marque_tx": 100,
      "tva_npr": null,
      "remise_percent": "20",
      "batch": "",
      "fk_warehouse": "0",
      "origin_id": null,
      "fk_code_ventilation": 0,
      "date_start": 1730329200,
      "date_end": 1761865200,
      "situation_percent": "100",
      "fk_prev_id": null,
      "label": null,
      "ref": "S-3P1",
      "libelle": "*********************",
      "product_type": "1",
      "product_ref": "S-3P1",
      "product_label": "*********************",
      "product_desc": "",
      "qty": "1",
      "subprice": "30.00000000",
      "price": null,
      "fk_product": "90",
      "vat_src_code": "",
      "tva_tx": "21.000",
      "localtax1_tx": "0.000",
      "localtax2_tx": "0.000",
      "remise": null,
      "total_ht": "24.00000000",
      "total_tva": "5.04000000",
      "total_localtax1": "0.00000000",
      "total_localtax2": "0.00000000",
      "total_ttc": "29.04000000",
      "date_start_fill": null,
      "date_end_fill": null,
      "buy_price_ht": null,
      "buyprice": null,
      "info_bits": "0",
      "special_code": "0",
      "fk_user_author": null,
      "fk_user_modif": null,
      "fk_accounting_account": "0",
      "parent_element": "",
      "fk_parent_attribute": "",
      "id": "1582",
      "rowid": "1582",
      "fk_unit": null,
      "date_debut_prevue": null,
      "date_debut_reel": null,
      "date_fin_prevue": null,
      "date_fin_reel": null,
      "weight": null,
      "weight_units": null,
      "width": null,
      "width_units": null,
      "height": null,
      "height_units": null,
      "length": null,
      "length_units": null,
      "surface": null,
      "surface_units": null,
      "volume": null,
      "volume_units": null,
      "multilangs": null,
      "description": "",
      "product": null,
      "product_barcode": null,
      "fk_product_type": "1",
      "duree": null,
      "multicurrency_subprice": "30.00000000",
      "multicurrency_total_ht": "24.00000000",
      "multicurrency_total_tva": "5.04000000",
      "multicurrency_total_ttc": "29.04000000",
      "module": null,
      "entity": null,
      "import_key": null,
      "array_options": [],
      "array_languages": null,
      "contacts_ids": null,
      "linkedObjectsIds": null,
      "origin_type": null,
      "statut": null,
      "status": null,
      "state_id": null,
      "region_id": null,
      "demand_reason_id": null,
      "transport_mode_id": null,
      "shipping_method": null,
      "multicurrency_tx": null,
      "multicurrency_total_localtax1": null,
      "multicurrency_total_localtax2": null,
      "last_main_doc": null,
      "fk_account": null,
      "lines": null,
      "actiontypecode": null,
      "date_creation": null,
      "date_validation": null,
      "date_modification": null,
      "tms": null,
      "date_cloture": null,
      "user_author": null,
      "user_creation": null,
      "user_creation_id": null,
      "user_valid": null,
      "user_validation": null,
      "user_validation_id": null,
      "user_closing_id": null,
      "user_modification": null,
      "user_modification_id": null,
      "fk_user_creat": null,
      "specimen": 0,
      "extraparams": [],
      "cond_reglement_supplier_id": null,
      "deposit_percent": null,
      "retained_warranty_fk_cond_reglement": null,
      "warehouse_id": null
    }
  ],
  "line": "",
  "extraparams": [],
  "fac_rec": "",
  "date_pointoftax": "",
  "situation_cycle_ref": null,
  "situation_counter": null,
  "situation_final": "0",
  "tab_previous_situation_invoice": [],
  "tab_next_situation_invoice": [],
  "retained_warranty": "0",
  "retained_warranty_date_limit": "",
  "retained_warranty_fk_cond_reglement": "0",
  "availability_id": "",
  "date_closing": "",
  "source": "",
  "remise_percent": "",
  "online_payment_url": "**************wpayment.php?source=invoice&ref=FA2410-0023",
  "title": "",
  "type": "0",
  "subtype": null,
  "fk_soc": "",
  "socid": "22",
  "date": 1730329200,
  "date_lim_reglement": 1730329200,
  "cond_reglement_id": "1",
  "cond_reglement_code": "RECEP",
  "cond_reglement_label": "",
  "cond_reglement_doc": "Réception de facture",
  "mode_reglement_id": "3",
  "mode_reglement_code": "PRE",
  "totaldeposits": null,
  "totalcreditnotes": null,
  "sumpayed": null,
  "sumpayed_multicurrency": "",
  "sumdeposit": null,
  "sumdeposit_multicurrency": "",
  "sumcreditnote": null,
  "sumcreditnote_multicurrency": "",
  "remaintopay": "135.52",
  "stripechargedone": "",
  "stripechargeerror": "",
  "description": "",
  "close_code": null,
  "close_note": null,
  "postactionmessages": "",
  "module": "",
  "id": "965",
  "entity": "1",
  "import_key": "",
  "array_options": [],
  "array_languages": "",
  "contacts_ids": [],
  "linkedObjectsIds": {
    "commande": {
      "1397": "768"
    }
  },
  "fk_project": null,
  "contact_id": "",
  "user": "",
  "origin_type": "",
  "origin_id": "",
  "ref": "FA2410-0023",
  "ref_ext": null,
  "statut": "1",
  "status": "1",
  "country_id": "",
  "country_code": "",
  "state_id": "",
  "region_id": "",
  "demand_reason_id": "",
  "transport_mode_id": "",
  "shipping_method_id": "",
  "shipping_method": "",
  "fk_multicurrency": "0",
  "multicurrency_code": "EUR",
  "multicurrency_tx": "1.00000000",
  "multicurrency_total_ht": "112.00000000",
  "multicurrency_total_tva": "23.52000000",
  "multicurrency_total_ttc": "135.52000000",
  "multicurrency_total_localtax1": "",
  "multicurrency_total_localtax2": "",
  "last_main_doc": "facture/FA2410-0023/FA2410-0023.pdf",
  "fk_account": null,
  "note_public": "NEW PUBLIC",
  "note_private": "NEW PRIVATE",
  "actiontypecode": "",
  "name": "",
  "lastname": "",
  "firstname": "",
  "civility_id": "",
  "date_creation": 1730371423,
  "date_validation": 1730371423,
  "date_modification": 1732790063,
  "tms": "",
  "date_cloture": "",
  "user_author": "",
  "user_creation": "",
  "user_creation_id": "10",
  "user_valid": "",
  "user_validation": "",
  "user_validation_id": "10",
  "user_closing_id": "",
  "user_modification": "",
  "user_modification_id": "1",
  "fk_user_creat": "",
  "specimen": "0",
  "product": "",
  "cond_reglement_supplier_id": "",
  "deposit_percent": "",
  "warehouse_id": "",
  "fk_incoterms": "0",
  "label_incoterms": null,
  "location_incoterms": ""
}
Nos interesa enviar toda la factura porque updatamos más cosas no solo la nota pública y privada. Esto en la versión anterior la 19 funcionaba bien.

Muchas gracias.

Nota: por privacidad he puesto ********************* en algunos campos.