diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 5d76a7155d6..6f9c0534d2f 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -572,8 +572,10 @@ class AccountancyExport if (empty($line->subledger_account)) { print length_accountg($line->numero_compte) . $separator; + print $line->label_compte . $separator; } else { print length_accounta($line->subledger_account) . $separator; + print $line->subledger_label . $separator; } print $line->doc_ref . $separator; @@ -581,6 +583,7 @@ class AccountancyExport print price($line->credit) . $separator; print price($line->montant) . $separator; print $line->sens . $separator; + print $line->lettering_code . $separator; print $line->code_journal; print $end_line; } diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 1c13cfea1e1..d27c575a373 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -891,7 +891,7 @@ if (empty($action) || $action == 'view') { // Test that setup is complete - $sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL'; + $sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL AND clos=0'; $resql = $db->query($sql); if ($resql) { diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index b3e1681887a..63ffc22777a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -702,13 +702,14 @@ class Adherent extends CommonObject $lthirdparty->phone=$this->phone; $lthirdparty->state_id=$this->state_id; $lthirdparty->country_id=$this->country_id; - $lthirdparty->country_id=$this->country_id; //$lthirdparty->phone_mobile=$this->phone_mobile; - $result=$lthirdparty->update($this->fk_soc,$user,0,1,1,'update'); // Use sync to 0 to avoid cyclic updates + $result=$lthirdparty->update($this->fk_soc, $user, 0, 1, 1, 'update'); // Use sync to 0 to avoid cyclic updates + if ($result < 0) { $this->error=$lthirdparty->error; + $this->errors=$lthirdparty->errors; dol_syslog(get_class($this)."::update ".$this->error,LOG_ERR); $error++; } diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 04d175efa21..58f3cbb2caf 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -121,7 +121,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights { // Creation of thirdparty $company = new Societe($db); - $result=$company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha')); + $result=$company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha'), GETPOST('customercode', 'alpha')); if ($result < 0) { @@ -361,6 +361,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && ! $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "members")); + // Get email content from template $arraydefaultmessage=null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION; @@ -856,6 +857,15 @@ if ($rowid > 0) array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"'), array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"') ); + // If customer code was forced to "required", we ask it at creation to avoid error later + if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED)) + { + $tmpcompany = new Societe($db); + $tmpcompany->name=$companyname; + $customercode = $tmpcompany->get_codeclient($tmpcompany,0); + $formquestion[]=array('label' => $langs->trans("CustomerCode"), 'type' => 'text', 'name' => 'customercode', 'value' => $customercode, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"'); + } + // @TODO Add other extrafields mandatory for thirdparty creation print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index f68f31789ec..de92d7c9744 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -217,11 +217,14 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave','alpha')) { // Define if we have to generate thumbs or not $generatethumbs = 1; - if (GETPOST('section_dir')) $generatethumbs=0; + // When we rename a file from the file manager in ecm, we must not regenerate thumbs (not a problem, we do pass here) + // When we rename a file from the website module, we must not regenerate thumbs (module = medias in such a case) + // but when we rename from a tab "Documents", we must regenerate thumbs + if (GETPOST('modulepart') == 'medias') $generatethumbs=0; if ($generatethumbs) { - if ($object->id) + if ($object->id) { $object->addThumbs($destpath); } diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 24699f0e9f6..3dd66eb1da2 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -42,7 +42,7 @@ class box_produits extends ModeleBoxes * @var DoliDB Database handler. */ public $db; - + var $param; var $info_box_head = array(); @@ -135,13 +135,13 @@ class box_produits extends ModeleBoxes $productstatic->entity = $objp->entity; $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', + 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', 'text' => $productstatic->getNomUrl(1), 'asis' => 1, ); $this->info_box_contents[$line][] = array( - 'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', + 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', 'text' => $objp->label, ); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index 6a74cd005ab..708b781f092 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -190,7 +190,7 @@ class box_services_contracts extends ModeleBoxes } - $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', + $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', 'text' => $s, 'asis' => 1 ); @@ -200,7 +200,7 @@ class box_services_contracts extends ModeleBoxes 'asis' => 1 ); - $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"', + $this->info_box_contents[$i][] = array('td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', 'text' => $thirdpartytmp->getNomUrl(1), 'asis' => 1 ); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 31f4d32d2c4..afee4c1fcdd 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4954,6 +4954,7 @@ abstract class CommonObject if ($this->array_options[$key] === '') $mandatorypb=true; if ($mandatorypb) { + dol_syslog($this->error); $this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel); return -1; } @@ -6292,7 +6293,7 @@ abstract class CommonObject $e = 0; foreach($extrafields->attributes[$this->table_element]['label'] as $key=>$label) { - //Show only the key field in params + // Show only the key field in params if (is_array($params) && array_key_exists('onlykey',$params) && $key != $params['onlykey']) continue; $enabled = 1; diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index cc08af7431f..cfa05289f4b 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -29,14 +29,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); //var_dump($conf); diff --git a/htdocs/core/js/lib_gravatar.js.php b/htdocs/core/js/lib_gravatar.js.php index 485a57ede88..dad6482460a 100644 --- a/htdocs/core/js/lib_gravatar.js.php +++ b/htdocs/core/js/lib_gravatar.js.php @@ -33,14 +33,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); ?> diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index f2aa6fc521f..5b909c6e148 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -32,14 +32,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 6900e9b03e7..fa7095c65ac 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -40,7 +40,7 @@ if (! ($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root . '/' || $_SERVER['H // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when. /* session already started into main - session_cache_limiter(false); + session_cache_limiter('public'); header('Cache-Control: no-cache'); session_set_cookie_params(0, '/', null, false, true); // Add tag httponly on session cookie session_start();*/ diff --git a/htdocs/core/js/timepicker.js.php b/htdocs/core/js/timepicker.js.php index 8e67f517b44..38c450b8e23 100644 --- a/htdocs/core/js/timepicker.js.php +++ b/htdocs/core/js/timepicker.js.php @@ -29,14 +29,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); ?> diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 97a91951e81..12aa47ce9d6 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -156,6 +156,7 @@ class pdf_ban extends ModeleBankAccountDoc $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 9b49be6063f..6fc6594b1e3 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -163,6 +163,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index c4995ead47f..32d35edb70a 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -132,6 +132,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index d35c6c7f177..7009773e582 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -278,6 +278,7 @@ class pdf_einstein extends ModelePDFCommandes $heightforinfotot = 40; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; if (class_exists('TCPDF')) { diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 24dcf8743b0..3375e5b7ccc 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -228,6 +228,7 @@ class pdf_strato extends ModelePDFContract $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index df7e97cc622..bfda0e8dfad 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -229,6 +229,7 @@ class pdf_merou extends ModelePdfExpedition $heightforinfotot = 0; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 3548b2c2473..84f73cde1c6 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -291,6 +291,7 @@ class pdf_rouget extends ModelePdfExpedition $heightforinfotot = 8; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index 422f1139754..9851e1781e2 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -258,8 +258,10 @@ class pdf_standard extends ModeleExpenseReport $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance $heightforinfotot = 40; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page - $heightforfooter = $this->marge_basse + 12; // Height reserved to output the footer (value include bottom margin) - $pdf->SetAutoPageBreak(1,0); + $heightforfooter = $this->marge_basse + 12; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; + + $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) { diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 74fac8c5544..ab2ffb3bd2a 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -326,6 +326,7 @@ class pdf_crabe extends ModelePDFFactures $heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; if (class_exists('TCPDF')) { diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index b06922acdb9..22ec100a73e 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -223,6 +223,7 @@ class pdf_soleil extends ModelePDFFicheinter $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index 77847c9a0a6..971913cb58d 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -245,6 +245,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $heightforinfotot = 30; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 8d30448bf2f..e9af5b9aa6e 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -223,6 +223,7 @@ class pdf_standard extends ModelePDFProduct $heightforinfotot = 40; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; if (class_exists('TCPDF')) { diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 11305e8a246..f0161b30715 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -224,6 +224,7 @@ class pdf_baleine extends ModelePDFProjects $heightforinfotot = 40; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; if (class_exists('TCPDF')) { diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 6578b2ca5f5..bc8da2b114c 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -175,6 +175,7 @@ class pdf_beluga extends ModelePDFProjects $heightforinfotot = 40; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; if (class_exists('TCPDF')) { diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index e369018c80b..3d7b5b44c34 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -387,6 +387,7 @@ class pdf_azur extends ModelePDFPropales $heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0; $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; //print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit; $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs); diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index dec36d5adbd..f44240daa83 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -265,6 +265,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index e89a5afa801..06cf28daaed 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -313,6 +313,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 2a31f265097..5eeedb9dcfc 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -271,6 +271,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 525fdca1d59..b9f9aa39dcf 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -302,6 +302,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $heightforinfotot = 50; // Height reserved to output the info and total part $heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page $heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin) + if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6; $pdf->SetAutoPageBreak(1,0); if (class_exists('TCPDF')) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index fd2dec29ec9..6015a104334 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1847,6 +1847,7 @@ WithDolTrackingID=Dolibarr Tracking ID found WithoutDolTrackingID=Dolibarr Tracking ID not found FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) +ECMAutoTree=Show automatic ECM tree ##### Resource #### ResourceSetup=Configuration of Resource module UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index c581e6eae94..11d1c25b5df 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -29,6 +29,8 @@ MovementId=Movement ID StockMovementForId=Movement ID %d ListMouvementStockProject=List of stock movements associated to project StocksArea=Warehouses area +AllWarehouses=All warehouses +IncludeAlsoDraftOrders=Include also draft orders Location=Location LocationSummary=Short name location NumberOfDifferentProducts=Number of different products diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 2c25d8c26f1..a3a48e6fc56 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -38,7 +38,7 @@ ThirdPartyCustomers=Clientes ThirdPartyCustomersStats=Clientes ThirdPartyCustomersWithIdProf12=Clientes con %s ó %s ThirdPartySuppliers=Proveedores -ThirdPartyType=Tipo de empresa +ThirdPartyType=Tipo de tercero Individual=Particular ToCreateContactWithSameName=Creará automáticamente un contacto/dirección en el tercero con la misma información que el tercero. En la mayoría de los casos, aunque el tercero sea una persona física, creando solo el tercero será suficiente. ParentCompany=Sede central diff --git a/htdocs/langs/es_ES/margins.lang b/htdocs/langs/es_ES/margins.lang index 702b8a1aacc..9a4e450fde5 100644 --- a/htdocs/langs/es_ES/margins.lang +++ b/htdocs/langs/es_ES/margins.lang @@ -28,10 +28,10 @@ UseDiscountAsService=Como un servicio UseDiscountOnTotal=Sobre el total MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Indica si un descuento global se toma en cuenta como un producto, servicio o sólo en el total a la hora de calcular los márgenes. MARGIN_TYPE=Precio compra/coste sugerido por defecto por el cálculo de márgenes -MargeType1=Margin on Best vendor price +MargeType1=Margen en Mejor Precio Proveedor MargeType2=Margen en Precio Medio Ponderado (PMP) MargeType3=Margen en Precio de coste -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card
* Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined
* Margin on Cost price = Selling price - Cost price defined on product card or WAP if cost price not defined, or best supplier price if WAP not yet defined +MarginTypeDesc=* Margen en mejor precio de compra = Precio de venta - Mejor precio de proveedor definido en la ficha del producto
* Margen en Precio promedio ponderado (PMP) = Precio de venta - Precio Medio Ponderado del producto (PMP), o mejor precio de proveedor si PMP aún no está definido
* Margen en precio de coste = Precio de venta - precio de coste definido en la ficha del producto o PMP si el precio de coste no está definido, o mejor precio de proveedor si PMP aún no está definido CostPrice=Precio de compra UnitCharges=Carga unitaria Charges=Cargas diff --git a/htdocs/langs/es_ES/orders.lang b/htdocs/langs/es_ES/orders.lang index 0c56501ab5a..10898b187ad 100644 --- a/htdocs/langs/es_ES/orders.lang +++ b/htdocs/langs/es_ES/orders.lang @@ -101,8 +101,8 @@ DraftSuppliersOrders=Draft purchase orders OnProcessOrders=Pedidos en proceso RefOrder=Ref. pedido RefCustomerOrder=Ref. pedido para el cliente -RefOrderSupplier=Ref. order for vendor -RefOrderSupplierShort=Ref. order vendor +RefOrderSupplier=Ref. pedido para el proveedor +RefOrderSupplierShort=Ref. ped. prov. SendOrderByMail=Enviar pedido por e-mail ActionsOnOrder=Eventos sobre el pedido NoArticleOfTypeProduct=No hay artículos de tipo 'producto' y por lo tanto enviables en este pedido @@ -125,11 +125,11 @@ TypeContact_commande_internal_SHIPPING=Responsable envío pedido cliente TypeContact_commande_external_BILLING=Contacto cliente facturación pedido TypeContact_commande_external_SHIPPING=Contacto cliente entrega pedido TypeContact_commande_external_CUSTOMER=Contacto cliente seguimiento pedido -TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order +TypeContact_order_supplier_internal_SALESREPFOLL=Comercial seguimiento pedido de compra TypeContact_order_supplier_internal_SHIPPING=Responsable recepción pedido a proveedor -TypeContact_order_supplier_external_BILLING=Vendor invoice contact -TypeContact_order_supplier_external_SHIPPING=Vendor shipping contact -TypeContact_order_supplier_external_CUSTOMER=Vendor contact following-up order +TypeContact_order_supplier_external_BILLING=Contacto proveedor factura +TypeContact_order_supplier_external_SHIPPING=Contacto seguimiento proveedor +TypeContact_order_supplier_external_CUSTOMER=Contacto seguimiento pedido a proveedor Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON no definida Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_ADDON no definida Error_OrderNotChecked=No se han seleccionado pedidos a facturar diff --git a/htdocs/langs/es_ES/supplier_proposal.lang b/htdocs/langs/es_ES/supplier_proposal.lang index 07e5cf18b19..2ccfdecade8 100644 --- a/htdocs/langs/es_ES/supplier_proposal.lang +++ b/htdocs/langs/es_ES/supplier_proposal.lang @@ -1,22 +1,22 @@ # Dolibarr language file - Source file is en_US - supplier_proposal -SupplierProposal=Vendor commercial proposals -supplier_proposalDESC=Manage price requests to vendors +SupplierProposal=Presupuestos de proveedor +supplier_proposalDESC=Gestiona presupuestos de proveedor SupplierProposalNew=Nuevo presupuesto CommRequest=Presupuesto CommRequests=Presupuestos SearchRequest=Buscar un presupuesto DraftRequests=Presupuestos borrador -SupplierProposalsDraft=Draft vendor proposals -LastModifiedRequests=Últimos %s consultas de precios modificados +SupplierProposalsDraft=Presupuestos de proveedor borrador +LastModifiedRequests=Últimos %s presupuestos RequestsOpened=Presupuestos abiertos -SupplierProposalArea=Vendor proposals area -SupplierProposalShort=Vendor proposal -SupplierProposals=Vendor proposals -SupplierProposalsShort=Vendor proposals +SupplierProposalArea=Área presupuestos de proveedor +SupplierProposalShort=Presupuesto de proveedor +SupplierProposals=Presupuestos de proveedor +SupplierProposalsShort=Presup. proveedor NewAskPrice=Nuevo presupuesto ShowSupplierProposal=Mostrar presupuesto AddSupplierProposal=Crear un presupuesto -SupplierProposalRefFourn=Vendor ref +SupplierProposalRefFourn=Ref. proveedor SupplierProposalDate=Fecha de entrega SupplierProposalRefFournNotice=Antes de cerrar a "Aceptado", piense en consultar las referencias de proveedores. ConfirmValidateAsk=¿Está seguro de querer validar este presupuesto bajo la referencia %s? @@ -47,9 +47,9 @@ CommercialAsk=Presupuesto DefaultModelSupplierProposalCreate=Modelo por defecto DefaultModelSupplierProposalToBill=Modelo por defecto al cerrar un presupuesto (aceptado) DefaultModelSupplierProposalClosed=Modelo por defecto al cerrar un presupuesto (rechazado) -ListOfSupplierProposals=List of vendor proposal requests -ListSupplierProposalsAssociatedProject=List of vendor proposals associated with project -SupplierProposalsToClose=Vendor proposals to close -SupplierProposalsToProcess=Vendor proposals to process +ListOfSupplierProposals=Listado de presupuestos de proveedor +ListSupplierProposalsAssociatedProject=Listado de presupuestos de proveedor asociados al proyecto +SupplierProposalsToClose=Presupuestos de proveedor a cerrar +SupplierProposalsToProcess=Presupuestos de proveedor a procesar LastSupplierProposals=Últimos %s presupuestos AllPriceRequests=Todos los presupuestos diff --git a/htdocs/langs/es_ES/suppliers.lang b/htdocs/langs/es_ES/suppliers.lang index 4cbcf8788eb..ed58f3cf855 100644 --- a/htdocs/langs/es_ES/suppliers.lang +++ b/htdocs/langs/es_ES/suppliers.lang @@ -1,11 +1,11 @@ # Dolibarr language file - Source file is en_US - suppliers -Suppliers=Vendors -SuppliersInvoice=Vendor invoice -ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor +Suppliers=Proveedores +SuppliersInvoice=Factura de proveedor +ShowSupplierInvoice=Ver factura de proveedor +NewSupplier=Nuevo proveedor History=Histórico -ListOfSuppliers=List of vendors -ShowSupplier=Show vendor +ListOfSuppliers=Listado de proveedores +ShowSupplier=Ver proveedor OrderDate=Fecha de pedido BuyingPriceMin=Mejor precio de compra BuyingPriceMinShort=Mejor precio de compra @@ -14,12 +14,12 @@ TotalSellingPriceMinShort=Total de los precios de venta de los subproductos SomeSubProductHaveNoPrices=Algunos subproductos no tienen precio definido AddSupplierPrice=Añadir precio de compra ChangeSupplierPrice=Cambiar precio de compra -SupplierPrices=Vendor prices +SupplierPrices=Precios proveedor ReferenceSupplierIsAlreadyAssociatedWithAProduct=Esta referencia de proveedor ya está asociada a la referencia: %s -NoRecordedSuppliers=No vendor recorded -SupplierPayment=Vendor payment -SuppliersArea=Vendor area -RefSupplierShort=Ref. vendor +NoRecordedSuppliers=Sin proveedores registrados +SupplierPayment=Pagos a proveedor +SuppliersArea=Área proveedores +RefSupplierShort=Ref. proveedor Availability=Disponibilidad ExportDataset_fournisseur_1=Facturas de proveedor y líneas de factura ExportDataset_fournisseur_2=Facturas de proveedor y pagos @@ -31,17 +31,17 @@ ConfirmDenyingThisOrder=¿Está seguro de querer denegar el pedido a proveedor < ConfirmCancelThisOrder=¿Está seguro de querer cancelar el pedido a proveedor %s? AddSupplierOrder=Crear pedido a proveedor AddSupplierInvoice=Crear factura de proveedor -ListOfSupplierProductForSupplier=List of products and prices for vendor %s -SentToSuppliers=Sent to vendors +ListOfSupplierProductForSupplier=Listado de productos y precios del proveedor %s +SentToSuppliers=Enviado a proveedores ListOfSupplierOrders=Listado de pedidos a proveedor MenuOrdersSupplierToBill=Pedidos a proveedor a facturar NbDaysToDelivery=Tiempo de entrega en días DescNbDaysToDelivery=El mayor retraso en las entregas de productos de este pedido -SupplierReputation=Vendor reputation +SupplierReputation=Reputación proveedor DoNotOrderThisProductToThisSupplier=No realizar pedidos NotTheGoodQualitySupplier=Mala calidad ReputationForThisProduct=Reputación BuyerName=Nombre del comprador AllProductServicePrices=Todos los precios de producto / servicio AllProductReferencesOfSupplier=Todos las referencias de proveedores de producto / servicio -BuyingPriceNumShort=Vendor prices +BuyingPriceNumShort=Precios proveedor diff --git a/htdocs/langs/es_ES/workflow.lang b/htdocs/langs/es_ES/workflow.lang index 058e6bf75f0..05bfef7aee4 100644 --- a/htdocs/langs/es_ES/workflow.lang +++ b/htdocs/langs/es_ES/workflow.lang @@ -14,7 +14,7 @@ descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Clasificar pedido(s) de client descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificar pedido(s) de cliente origen como facturado cuando la factura a cliente sea marcada como pagada (y si el importe de la factura es la misma que la suma de los importes de los pedidos relacionados) descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificar automáticamente el pedido origen como enviado cuando el envío se valide (y si la cantidad enviada por todos los envíos sea la misma que el pedido) # Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificar los presupuesto(s) de proveedor origen como facturado(s) cuando la factura de proveedor (y si el importe de la factura es igual a la suma de los importes de los presupuestos relacionados) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificar pedido(s) a proveedor origen como facturado(s) cuando la factura de proveedor se valide (y si el importe de la factura es igual a la suma de los importes de los pedidos relacionados) AutomaticCreation=Creación automática AutomaticClassification=Clasificación automática diff --git a/htdocs/modulebuilder/template/css/mymodule.css.php b/htdocs/modulebuilder/template/css/mymodule.css.php index 486d860e7f5..9f3860f1484 100644 --- a/htdocs/modulebuilder/template/css/mymodule.css.php +++ b/htdocs/modulebuilder/template/css/mymodule.css.php @@ -48,7 +48,9 @@ if (! $res) die("Include of main fails"); require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -session_cache_limiter(false); +session_cache_limiter('public'); +// false or '' = keep cache instruction added by server +// 'public' = remove cache instruction added by server and if no cache-control added later, a default cache delay (10800) will be added by PHP. // Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS /*if (empty($user->id) && ! empty($_SESSION['dol_login'])) @@ -62,7 +64,7 @@ session_cache_limiter(false); header('Content-type: text/css'); // Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access. // You can use CTRL+F5 to refresh your browser cache. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); ?> diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index aaae328de48..f76f5eeec9c 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -161,13 +161,12 @@ class ProductStockEntrepot extends CommonObject /** * Load object in memory from the database * - * @param int $id Id object - * @param int $fk_product Id product - * @param int $fk_entrepot Id warehouse - * - * @return int <0 if KO, 0 if not found, >0 if OK + * @param int $id Id object + * @param int $fk_product Id product + * @param int $fk_entrepot Id warehouse + * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $fk_product, $fk_entrepot) + public function fetch($id, $fk_product=0, $fk_entrepot=0) { if(empty($id) && (empty($fk_product) || empty($fk_entrepot))) return -1; @@ -175,23 +174,22 @@ class ProductStockEntrepot extends CommonObject $sql = 'SELECT'; $sql .= ' t.rowid,'; - $sql .= " t.tms,"; $sql .= " t.fk_product,"; $sql .= " t.fk_entrepot,"; $sql .= " t.seuil_stock_alerte,"; $sql .= " t.desiredstock,"; $sql .= " t.import_key"; - - $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; if(!empty($id)) $sql .= ' WHERE t.rowid = ' . $id; else $sql.= ' WHERE t.fk_product = '.$fk_product.' AND t.fk_entrepot = '.$fk_entrepot; $resql = $this->db->query($sql); - if ($resql) { + if ($resql) + { $numrows = $this->db->num_rows($resql); - if ($numrows) { + if ($numrows) + { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 6d41e9589cb..9faaee5052e 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -137,14 +137,12 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) if($maj_ok) { $pse = new ProductStockEntrepot($db); - if($pse->fetch('', $id, GETPOST('fk_entrepot')) > 0) { - + if ($pse->fetch(0, $id, GETPOST('fk_entrepot','int')) > 0) { // Update $pse->seuil_stock_alerte = $seuil_stock_alerte; $pse->desiredstock = $desiredstock; if($pse->update($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseUpdated'), null, 'mesgs'); } else { - // Create $pse->fk_entrepot = GETPOST('fk_entrepot'); $pse->fk_product = $id; @@ -162,8 +160,9 @@ if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->c { $pse = new ProductStockEntrepot($db); - $pse->fetch(GETPOST('fk_productstockwarehouse')); - if($pse->delete($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseDeleted'), null, 'mesgs'); + + $pse->fetch(GETPOST('fk_productstockwarehouse','int')); + if ($pse->delete($user) > 0) setEventMessages($langs->trans('ProductStockWarehouseDeleted'), null, 'mesgs'); $action = ''; } @@ -804,6 +803,7 @@ if (! $variants) { */ print '
'; + print ''; print ''; print ''; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 754afea9c82..5d36da10429 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -296,22 +296,20 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entre $sql = 'SELECT p.rowid, p.ref, p.label, p.description, p.price,'; $sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,'; -$sql.= ' p.tms as datem, p.duration, p.tobuy'; -$sql.= ' ,p.desiredstock,p.seuil_stock_alerte'; -if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { - $sql.= ', pse.desiredstock' ; - $sql.= ', pse.seuil_stock_alerte' ; +$sql.= ' p.tms as datem, p.duration, p.tobuy,'; +$sql.= ' p.desiredstock, p.seuil_stock_alerte,'; +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { + $sql.= ' pse.desiredstock as desiredstockpse, pse.seuil_stock_alerte as seuil_stock_alertepse,'; } -$sql.= ' ,'.$sqldesiredtock.' as desiredstock, '.$sqlalertstock.' as alertstock,'; - +$sql.= ' '.$sqldesiredtock.' as desiredstockcombined, '.$sqlalertstock.' as seuil_stock_alertecombined,'; $sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique'; $sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p'; $sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s'; $sql.= ' ON (p.rowid = s.fk_product AND s.fk_entrepot IN (SELECT ent.rowid FROM '.MAIN_DB_PREFIX.'entrepot AS ent WHERE ent.entity IN('.getEntity('stock').')))'; -if($fk_supplier > 0) { +if ($fk_supplier > 0) { $sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'product_fournisseur_price pfp ON (pfp.fk_product = p.rowid AND pfp.fk_soc = '.$fk_supplier.')'; } -if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')'; } $sql.= ' WHERE p.entity IN (' . getEntity('product') . ')'; @@ -333,7 +331,7 @@ $sql.= ', p.price_ttc, p.price_base_type,p.fk_product_type, p.tms'; $sql.= ', p.duration, p.tobuy'; $sql.= ', p.desiredstock'; $sql.= ', p.seuil_stock_alerte'; -if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { $sql.= ', pse.desiredstock' ; $sql.= ', pse.seuil_stock_alerte' ; } @@ -372,7 +370,7 @@ if ($usevirtualstock) $sqlReceptionFourn.= " AND fd.fk_product = p.rowid"; $sqlReceptionFourn.= " AND cf.fk_statut IN (3,4))"; - $sql.= ' HAVING ((('.$db->ifsql($sqldesiredtock." IS NULL", "0", $sqldesiredtock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql.= ' HAVING (('.$sqldesiredtock.' >= 0 AND ('.$sqldesiredtock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; $sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.')))'; $sql.= ' OR ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; $sql.= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.'))))'; @@ -404,7 +402,6 @@ if (empty($resql)) dol_print_error($db); exit; } -//print $sql; $num = $db->num_rows($resql); $i = 0; @@ -513,9 +510,12 @@ $param .= '&fk_supplier=' . $fk_supplier; $param .= '&fk_entrepot=' . $fk_entrepot; $stocklabel = $langs->trans('Stock'); -if ($usevirtualstock == 1) $stocklabel = 'VirtualStock'; -if ($usevirtualstock == 0) $stocklabel = 'PhysicalStock'; - +if ($usevirtualstock == 1) $stocklabel = $langs->trans('VirtualStock'); +if ($usevirtualstock == 0) $stocklabel = $langs->trans('PhysicalStock'); +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) +{ + $stocklabel.=' ('.$langs->trans("AllWarehouses").')'; +} print ''. ''. ''. @@ -536,7 +536,7 @@ if (!empty($conf->service->enabled) && $type == 1) print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; + print ''; - // Limit stock for alerr - print ''; + // Limit stock for alert + print ''; - // Current stock + // Current stock (all warehouses) print ''; // Already ordered diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index 52b3b843fa1..ca774aa7bb9 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -61,7 +61,7 @@ if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) { } else { print '
'; print '

' . ($conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans("TicketPublicDesc")) . '

'; - print '
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 7559301a913..48a38fdb080 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3304,12 +3304,13 @@ class Societe extends CommonObject /** * Create a third party into database from a member object * - * @param Adherent $member Object member - * @param string $socname Name of third party to force - * @param string $socalias Alias name of third party to force - * @return int <0 if KO, id of created account if OK + * @param Adherent $member Object member + * @param string $socname Name of third party to force + * @param string $socalias Alias name of third party to force + * @param string $customercode Customer code + * @return int <0 if KO, id of created account if OK */ - function create_from_member(Adherent $member, $socname='', $socalias='') + function create_from_member(Adherent $member, $socname='', $socalias='', $customercode='') { // phpcs:enable global $user,$langs; @@ -3337,7 +3338,7 @@ class Societe extends CommonObject $this->facebook=$member->facebook; $this->client = 1; // A member is a customer by default - $this->code_client = -1; + $this->code_client = ($customercode?$customercode:-1); $this->code_fournisseur = -1; $this->db->begin(); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index be3c6c483f1..238c3fa801a 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -59,19 +59,24 @@ $fontsizesmaller='0.75em'; if (defined('THEME_ONLY_CONSTANT')) return; -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined) -if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSION['dol_login'],'',1); +// and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile. +if (empty($user->id) && ! empty($_SESSION['dol_login'])) +{ + $user->fetch('',$_SESSION['dol_login'],'',1); + $user->getrights(); +} // Define css type top_httphead('text/css'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL @@ -1074,10 +1079,13 @@ select.selectarrowonleft option { /* padding: .4em .1em; */ /* border-bottom: 1px solid #BBB; */ /* max-width: inherit; why this ? */ - } - input[type=text], input[type=password] { + } + input[type=text], input[type=password] { max-width: 180px; } + .vmenu .searchform input { + max-width: 138px; /* length of input text in the quick search box when using a smartphone and without dolidroid */ + } .hideonsmartphone { display: none; } .hideonsmartphoneimp { display: none !important; } diff --git a/htdocs/theme/md/img/menus/ticket.png b/htdocs/theme/md/img/menus/ticket.png index 98beeaf593a..98a482c4701 100644 Binary files a/htdocs/theme/md/img/menus/ticket.png and b/htdocs/theme/md/img/menus/ticket.png differ diff --git a/htdocs/theme/md/img/object_ticket.png b/htdocs/theme/md/img/object_ticket.png index 8ece94fbefc..38df927744e 100644 Binary files a/htdocs/theme/md/img/object_ticket.png and b/htdocs/theme/md/img/object_ticket.png differ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 7e4d8ec11d2..30c781c2bfe 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -60,19 +60,24 @@ $fontsizesmaller='11'; if (defined('THEME_ONLY_CONSTANT')) return; -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load user to have $user->conf loaded (not done into main because of NOLOGIN constant defined) -if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSION['dol_login'],'',1); +// and permission, so we can later calculate number of top menu ($nbtopmenuentries) according to user profile. +if (empty($user->id) && ! empty($_SESSION['dol_login'])) +{ + $user->fetch('',$_SESSION['dol_login'],'',1); + $user->getrights(); +} // Define css type top_httphead('text/css'); // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); if (GETPOST('theme','alpha')) $conf->theme=GETPOST('theme','alpha'); // If theme was forced on URL @@ -1990,7 +1995,7 @@ div.login_block { vertical-align: middle; background: rgb(); width: 228px; - height: 43px; + height: 45px; display: none; diff --git a/htdocs/ticket/css/styles.css.php b/htdocs/ticket/css/styles.css.php index f8368f7e5f2..2c699461fb5 100644 --- a/htdocs/ticket/css/styles.css.php +++ b/htdocs/ticket/css/styles.css.php @@ -56,14 +56,8 @@ if (! empty($conf->global->TICKET_SHOW_MODULE_LOGO)) { ?> } -body { - font-size: 0.88em; - background: none; - min-height: 600px; - /*padding-bottom:150px;*/ -} -div.corps { +div.ticketform { font-family: arial; position: static; padding: 2em 1em; @@ -78,13 +72,13 @@ div.corps { } -.index_create, .index_display { +div.ticketform .index_create, .index_display { float: left; width: 33%; text-align: center; } -.orange { +div.ticketform .orange { color: #fef4e9; border: solid 1px #da7c0c; background: #f78d1d; @@ -92,22 +86,21 @@ div.corps { background: -moz-linear-gradient(top, #faa51a, #f47a20); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20'); } -.orange:active { +div.ticketform .orange:active { color: #fcd3a5; background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a)); background: -moz-linear-gradient(top, #f47a20, #faa51a); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#faa51a'); } -.orange:hover { +div.ticketform .orange:hover { background: #f47c20; background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015)); background: -moz-linear-gradient(top, #f88e11, #f06015); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015'); } - -.blue { +div.ticketform .blue { color: #d9eef7; border: solid 1px #0076a3; background: #0095cd; @@ -115,22 +108,21 @@ div.corps { background: -moz-linear-gradient(top, #00adee, #0078a5); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5'); } -.blue:active { +div.ticketform .blue:active { color: #80bed6; background: -webkit-gradient(linear, left top, left bottom, from(#0078a5), to(#00adee)); background: -moz-linear-gradient(top, #0078a5, #00adee); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0078a5', endColorstr='#00adee'); } -.blue:hover { +div.ticketform .blue:hover { background: #007ead; background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e)); background: -moz-linear-gradient(top, #0095cc, #00678e); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0095cc', endColorstr='#00678e'); } -#form_create_ticket, -#form_view_ticket { - +#form_create_ticket, #form_view_ticket +{ margin-left: 10px; margin-right: 10px; padding-left:1em; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f42c82e89e3..e4617a4f4e8 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -610,7 +610,7 @@ if (empty($reshook)) { $trigger_name='USER_SENTBYMAIL'; $paramname='id'; // Name of param key to open the card $mode='emailfromuser'; - $trackid='use'.$object->id; + $trackid='use'.$id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; // Actions to build doc @@ -1247,9 +1247,9 @@ else if (empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { $object->getrights(); - if (empty($object->nb_rights) && $object->statut != 0) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings'); + if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings'); } - + // Connexion ldap // pour recuperer passDoNotExpire et userChangePassNextLogon if (! empty($conf->ldap->enabled) && ! empty($object->ldap_sid)) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 3606675a1c1..bb9d6ae43e0 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2540,7 +2540,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') print '
'; @@ -2606,7 +2606,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') print ''; @@ -2636,8 +2636,8 @@ if ($action == 'editmeta' || $action == 'createcontainer') } print '
' . $langs->trans("Warehouse") . '
  ' . $langs->trans('AlertOnly') . ' ' . $langs->trans('Draft') . ' ' . $langs->trans('IncludeAlsoDraftOrders') . '  '; $searchpicto=$form->showFilterAndCheckAddButtons(0); @@ -608,20 +608,23 @@ while ($i < ($limit ? min($num, $limit) : $num)) //print $prod->stats_reception['qty']; $ordered = $prod->stats_commande_fournisseur['qty'] - $prod->stats_reception['qty']; + $desiredstock=($objp->desiredstockpse ? $objp->desiredstockpse : $objp->desiredstock); + $alertstock=($objp->seuil_stock_alertepse ? $objp->seuil_stock_alertepse : $objp->seuil_stock_alerte); + $warning=''; - if ($objp->alertstock && ($stock < $objp->alertstock)) + if ($alertstock && ($stock < $alertstock)) { $warning = img_warning($langs->trans('StockTooLow')) . ' '; } //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value - $stocktobuy = max(max($objp->desiredstock, $objp->alertstock) - $stock - $ordered, 0); + $stocktobuy = max(max($desiredstock, $alertstock) - $stock - $ordered, 0); $disabled = ''; if ($ordered > 0) { $stockforcompare = $usevirtualstock ? $stock : $stock + $ordered; - if ($stockforcompare >= $objp->desiredstock) + if ($stockforcompare >= $desiredstock) { $picto = img_picto('', './img/yes', '', 1); $disabled = 'disabled'; @@ -661,12 +664,12 @@ while ($i < ($limit ? min($num, $limit) : $num)) } // Desired stock - print '' . $objp->desiredstock . '' . $desiredstock . '' . $objp->alertstock . '' . $alertstock . ''. $warning . $stock. '
'; $htmlhelp=$langs->trans("WEBSITE_IMAGEDesc"); - print $form->textwithpicto($langs->trans('WEBSITE_IMAGE'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); + print $form->textwithpicto($langs->trans('WEBSITE_IMAGE'), $htmlhelp, 1, 'help', '', 0, 2, 'imagetooltip'); print ''; print ''; print '
'; $htmlhelp=$langs->trans("WEBSITE_ALIASALTDesc"); - print $form->textwithpicto($langs->trans('WEBSITE_ALIASALT'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); + print $form->textwithpicto($langs->trans('WEBSITE_ALIASALT'), $htmlhelp, 1, 'help', '', 0, 2, 'aliastooltip'); print ''; print ''; print '
'; - $htmlhelp=$langs->trans("EditTheWebSiteForACommonHeader").'

'; - $htmlhelp=$langs->trans("Example").' :
'; + $htmlhelp =$langs->trans("EditTheWebSiteForACommonHeader").'

'; + $htmlhelp.=$langs->trans("Example").' :
'; $htmlhelp.=dol_htmlentitiesbr($htmlheadercontentdefault); print $form->textwithpicto($langs->trans('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip'); print '
';