diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index df87efcd8c3..2d18568bf2d 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -65,6 +65,8 @@ class DolibarrApi $this->r->setBaseUrls($urlwithouturlroot, $urlwithouturlrootautodetect); $this->r->setAPIVersion(1); + //$this->r->setSupportedFormats('json'); + //$this->r->setSupportedFormats('jsonFormat'); } /** diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c0cd1b49ce9..51501b543e0 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -75,6 +75,7 @@ $search_total_ht=GETPOST('search_total_ht','alpha'); $optioncss = GETPOST('optioncss','alpha'); $billed = GETPOST('billed','int'); $viewstatut=GETPOST('viewstatut'); +$search_project_ref=GETPOST('search_project_ref','alpha'); // Security check $id = (GETPOST('orderid')?GETPOST('orderid','int'):GETPOST('id','int')); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b84d31ddae3..b4426a02f74 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6291,7 +6291,7 @@ abstract class CommonObject if (! empty($this->fields[$key]['foreignkey']) && $values[$key] == '-1') $values[$key]=''; //var_dump($key.'-'.$values[$key].'-'.($this->fields[$key]['notnull'] == 1)); - if ($this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default'])) + if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && ! isset($values[$key]) && is_null($val['default'])) { $error++; $this->errors[]=$langs->trans("ErrorFieldRequired", $this->fields[$key]['label']); diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 7c24e49e89b..cdd0929c74b 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -6,7 +6,7 @@ * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2015 Marcos García - * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2017-2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -318,7 +318,7 @@ class pdf_einstein extends ModelePDFCommandes $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { - $tab_top = 88; + $tab_top = 88+$top_shift; $pdf->SetFont('','', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($desc_incoterms), 0, 1); @@ -353,7 +353,7 @@ class pdf_einstein extends ModelePDFCommandes complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - $tab_top = 88 + $height_incoterms; + $tab_top = 88 + $top_shift + $height_incoterms; $pdf->SetFont('','', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 0e781044a18..392f2d9ed9b 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -7,7 +7,7 @@ * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Doursenaud * Copyright (C) 2015 Marcos García - * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2017-2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -352,7 +352,7 @@ class pdf_crabe extends ModelePDFFactures $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { - $tab_top = 88; + $tab_top = 88+$top_shift; $pdf->SetFont('','', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($desc_incoterms), 0, 1); @@ -387,7 +387,7 @@ class pdf_crabe extends ModelePDFFactures complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - $tab_top = 88 + $height_incoterms; + $tab_top = 88 +$top_shift + $height_incoterms; $pdf->SetFont('','', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 7be8b6a0d08..5e902ebdbc0 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -6,7 +6,7 @@ * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2015 Marcos García - * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2017-2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -350,7 +350,7 @@ class pdf_azur extends ModelePDFPropales $desc_incoterms = $object->getIncotermsForPDF(); if ($desc_incoterms) { - $tab_top = 88; + $tab_top = 88+$top_shift; $pdf->SetFont('','', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top-1, dol_htmlentitiesbr($desc_incoterms), 0, 1); @@ -393,7 +393,7 @@ class pdf_azur extends ModelePDFPropales complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - $tab_top = 88 + $height_incoterms; + $tab_top = 88 +$top_shift + $height_incoterms; $pdf->SetFont('','', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1);