mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -251,7 +251,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) {
|
||||
|
||||
print '</td><td>';
|
||||
if ($action == 'edit') {
|
||||
print '<input class="flat minwidth250" name="title" value="'.(GETPOSTISSET("title") ? GETPOST("title", '', 2) : $object->title).'">';
|
||||
print '<input class="flat minwidth250" name="title" value="'.(GETPOSTISSET("title") ? GETPOST("title", 'alphanohtml', 2) : $object->title).'">';
|
||||
} else {
|
||||
print dol_escape_htmltag($object->title);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -188,7 +188,7 @@ if ($action == 'create') {
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" class="minwidth200" value="'.(GETPOSTISSET("label") ? GETPOST("label", '', 2) : $langs->transcountry(($lttype == 2 ? "LT2Payment" : "LT1Payment"), $mysoc->country_code)).'"></td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" class="minwidth200" value="'.(GETPOSTISSET("label") ? GETPOST("label", 'alphanohtml', 2) : $langs->transcountry(($lttype == 2 ? "LT2Payment" : "LT1Payment"), $mysoc->country_code)).'"></td></tr>';
|
||||
|
||||
// Amount
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.GETPOST("amount").'"></td></tr>';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
@@ -470,7 +470,7 @@ if ($action == 'create') {
|
||||
} else {
|
||||
$label = $langs->trans("VATPayment");
|
||||
}
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Label").'</td><td><input class="minwidth300" name="label" id="label" value="'.(GETPOSTISSET("label") ? GETPOST("label", '', 2) : $label).'" autofocus></td></tr>';
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Label").'</td><td><input class="minwidth300" name="label" id="label" value="'.(GETPOSTISSET("label") ? GETPOST("label", 'alphanohtml', 2) : $label).'" autofocus></td></tr>';
|
||||
|
||||
print '<tr><td class="titlefieldcreate fieldrequired">'.$form->textwithpicto($langs->trans("PeriodEndDate"), $langs->trans("LastDayTaxIsRelatedTo")).'</td><td>';
|
||||
print $form->selectDate((GETPOSTINT("datevmonth") ? $datev : -1), "datev", 0, 0, 0, 'add', 1, 1);
|
||||
|
||||
@@ -233,7 +233,6 @@ class Contracts extends DolibarrApi
|
||||
public function post($request_data = null)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
if (!DolibarrApiAccess::$user->hasRight('contrat', 'creer')) {
|
||||
throw new RestException(403, "Insufficient rights");
|
||||
}
|
||||
@@ -249,8 +248,8 @@ class Contracts extends DolibarrApi
|
||||
if ($field == 'id') {
|
||||
throw new RestException(400, 'Creating with id field is forbidden');
|
||||
}
|
||||
if ($field == 'entity' && $value != $conf->entity) {
|
||||
throw new RestException(403, 'Creating entity not the same as your API user is forbidden');
|
||||
if ($field == 'entity' && ((int) $value) != ((int) $conf->entity)) {
|
||||
throw new RestException(403, 'Creating with entity='.((int) $value).' MUST be the same entity='.((int) $conf->entity).' as your API user/key belongs to');
|
||||
}
|
||||
|
||||
if ($field == 'socid') {
|
||||
|
||||
@@ -78,7 +78,10 @@ print '<br>';
|
||||
|
||||
print '<table width="100%"><tr><td>';
|
||||
dol_print_object_info($object);
|
||||
print '</td></tr></table>';
|
||||
print '</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('CronLastResult').' : '.dolPrintHTML($object->lastresult).'</td></tr>';
|
||||
print '<tr><td>'.$langs->trans('CronLastOutput').' : '.dolPrintHTML($object->lastoutput).'</td></tr>';
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
@@ -66,6 +66,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'KYD'
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'CLP', '[36]', 1, 'Chile Peso');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'CNY', '[165]', 1, 'China Yuan Renminbi');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'COP', '[36]', 1, 'Colombia Peso');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'CDF', '[70,67]', 1, 'Congolese Franc');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'CRC', '[8353]', 1, 'Costa Rica Colon');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'HRK', '[107,110]', 1, 'Croatia Kuna');
|
||||
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'CUP', '[8369]', 1, 'Cuba Peso');
|
||||
|
||||
@@ -110,3 +110,16 @@ GET http://{{hostnport}}/api/index.php/contracts?limit=1
|
||||
HTTP 200
|
||||
[Captures]
|
||||
contract_id: jsonpath "$[0]['id']"
|
||||
|
||||
# POST socid 0
|
||||
POST http://{{hostnport}}/api/index.php/contracts
|
||||
{
|
||||
"entity" : "1",
|
||||
"socid": "0",
|
||||
"date_contrat": 1759738652,
|
||||
"commercial_signature_id": 1,
|
||||
"commercial_suivi_id": 1,
|
||||
"note_public": "TEST 22.0.2"
|
||||
}
|
||||
HTTP 404
|
||||
{"error":{"code":404,"message":"Not Found: Thirdparty with id=0 not found"}}
|
||||
|
||||
Reference in New Issue
Block a user