mirror of
https://github.com/latinogino/dolibarr-mcp.git
synced 2026-05-01 13:55:35 +02:00
fix(client): map customer_id to socid in create_invoice (BUG-1)
This commit is contained in:
@@ -388,6 +388,11 @@ class DolibarrClient:
|
|||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
"""Create a new invoice."""
|
"""Create a new invoice."""
|
||||||
payload = self._merge_payload(data, **kwargs)
|
payload = self._merge_payload(data, **kwargs)
|
||||||
|
|
||||||
|
# Fix: Map customer_id to socid
|
||||||
|
if "customer_id" in payload and "socid" not in payload:
|
||||||
|
payload["socid"] = payload.pop("customer_id")
|
||||||
|
|
||||||
result = await self.request("POST", "invoices", data=payload)
|
result = await self.request("POST", "invoices", data=payload)
|
||||||
return self._extract_identifier(result)
|
return self._extract_identifier(result)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user