From 42c97cf7d54b5953987c489b2b48dcaed470fdb6 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 2 Dec 2018 17:59:11 +0100 Subject: [PATCH 01/26] Fix #6610 --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 5e83ee81fd0..79a85d4ca9c 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1169,7 +1169,7 @@ else // Check if user has rights $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 From 8fea6338e1b5ba078e64c005ec724228ac54c68c Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 2 Dec 2018 18:51:49 +0100 Subject: [PATCH 02/26] Fix #6565 Fix pdf footer height for all documents --- htdocs/core/modules/bank/doc/pdf_ban.modules.php | 1 + htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php | 1 + htdocs/core/modules/cheque/doc/pdf_blochet.class.php | 1 + htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 1 + htdocs/core/modules/contract/doc/pdf_strato.modules.php | 1 + htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 1 + htdocs/core/modules/expedition/doc/pdf_rouget.modules.php | 1 + htdocs/core/modules/expensereport/doc/pdf_standard.modules.php | 1 + htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 1 + htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 1 + htdocs/core/modules/livraison/doc/pdf_typhon.modules.php | 1 + htdocs/core/modules/product/doc/pdf_standard.modules.php | 1 + htdocs/core/modules/project/doc/pdf_baleine.modules.php | 1 + htdocs/core/modules/project/doc/pdf_beluga.modules.php | 1 + htdocs/core/modules/propale/doc/pdf_azur.modules.php | 1 + htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php | 1 + htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php | 1 + .../core/modules/supplier_payment/doc/pdf_standard.modules.php | 1 + htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php | 1 + 19 files changed, 19 insertions(+) diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 699b186a9d2..9f8d675310a 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -149,6 +149,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 3dc615d9deb..46c7817c271 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -158,6 +158,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 dc8681a85fd..58790f91ca3 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -129,6 +129,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 9dc2b770222..8ab3407baa3 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -245,6 +245,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 77904beac0b..26417848762 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -175,6 +175,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 72b9a7e6def..7cc382531fc 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -163,6 +163,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 8f51e9b9e40..f37418688e7 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -225,6 +225,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 e4ad7b7db36..c4828d32b74 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -205,6 +205,7 @@ class pdf_standard extends ModeleExpenseReport $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; $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 804eb8885db..f14ea701314 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -265,6 +265,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 e88e9ad10c5..6f6cbbd6f91 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -166,6 +166,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 bbc74f3b6bb..1ef14478ebc 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -195,6 +195,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 2ceca5791a8..02ebe610dd7 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -195,6 +195,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 334846ab69b..10a808e263a 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -141,6 +141,7 @@ class pdf_baleine extends ModelePDFProjects $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/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 15fd0e5f615..0409c0b9472 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -159,6 +159,7 @@ class pdf_beluga extends ModelePDFProjects $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/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 17b99fb8b36..f9816de1a03 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -328,6 +328,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 9cfc1be320b..75a507d0546 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -211,6 +211,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 23a06264778..eabb045df66 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -223,6 +223,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 7d0772f272c..20dcad9c5c4 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -219,6 +219,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 a6457dd7a2e..80152207ac0 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -239,6 +239,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')) From 50da3c2ed2d6cbe7c02cededc9b6cca94811953c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 16 Dec 2018 06:14:33 +0100 Subject: [PATCH 03/26] Fix: Problem with loan integration in general ledger --- htdocs/accountancy/journal/bankjournal.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index d40c5ea059b..679f1ae4bf9 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -373,7 +373,13 @@ if ($result) { $paymentloanstatic->fk_loan = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentloanstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentloanid"] = $paymentloanstatic->id; - //$tabtp[$obj->rowid][$account_pay_loan] += $obj->amount; + $paymentloanstatic->fetch($paymentloanstatic->id); + $account_loan_capital = (! empty($paymentloanstatic->account_capital) ? $paymentvariousstatic->account_capital : 'NotDefined'); // NotDefined is a reserved word + $account_loan_interest = (! empty($paymentloanstatic->account_interest) ? $paymentvariousstatic->account_interest : 'NotDefined'); // NotDefined is a reserved word + $account_loan_insurance = (! empty($paymentloanstatic->account_insurance) ? $paymentvariousstatic->account_insurance : 'NotDefined'); // NotDefined is a reserved word + $tabtp[$obj->rowid][$account_capital] += $obj->capital; + $tabtp[$obj->rowid][$account_interest] += $obj->interest; + $tabtp[$obj->rowid][$account_insurance] += $obj->insurance; } else if ($links[$key]['type'] == 'banktransfert') { $accountLinestatic->fetch($links[$key]['url_id']); $tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1); From 8148ea83614a8a15d8f60912acd0f1396f0f2d8c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 16 Dec 2018 06:16:14 +0100 Subject: [PATCH 04/26] Revert "Fix: Problem with loan integration in general ledger" This reverts commit 50da3c2ed2d6cbe7c02cededc9b6cca94811953c. --- htdocs/accountancy/journal/bankjournal.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 679f1ae4bf9..d40c5ea059b 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -373,13 +373,7 @@ if ($result) { $paymentloanstatic->fk_loan = $links[$key]['url_id']; $tabpay[$obj->rowid]["lib"] .= ' ' . $paymentloanstatic->getNomUrl(2); $tabpay[$obj->rowid]["paymentloanid"] = $paymentloanstatic->id; - $paymentloanstatic->fetch($paymentloanstatic->id); - $account_loan_capital = (! empty($paymentloanstatic->account_capital) ? $paymentvariousstatic->account_capital : 'NotDefined'); // NotDefined is a reserved word - $account_loan_interest = (! empty($paymentloanstatic->account_interest) ? $paymentvariousstatic->account_interest : 'NotDefined'); // NotDefined is a reserved word - $account_loan_insurance = (! empty($paymentloanstatic->account_insurance) ? $paymentvariousstatic->account_insurance : 'NotDefined'); // NotDefined is a reserved word - $tabtp[$obj->rowid][$account_capital] += $obj->capital; - $tabtp[$obj->rowid][$account_interest] += $obj->interest; - $tabtp[$obj->rowid][$account_insurance] += $obj->insurance; + //$tabtp[$obj->rowid][$account_pay_loan] += $obj->amount; } else if ($links[$key]['type'] == 'banktransfert') { $accountLinestatic->fetch($links[$key]['url_id']); $tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1); From 6eb901343026c6ab58c532cb5e2f49a11b069bf8 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 16 Dec 2018 06:36:55 +0100 Subject: [PATCH 05/26] Fix: Accountancy - remove alert on bank account configuration when bank account is closed --- htdocs/accountancy/journal/bankjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 030140b7f11..434319a2eb9 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -840,7 +840,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) { From 6ce0d3e279db42636e230ea93316f7fde20e0a30 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sun, 16 Dec 2018 11:16:12 +0100 Subject: [PATCH 06/26] FIX: Vendor translations are in english --- htdocs/langs/es_ES/companies.lang | 44 +++++++++++------------ htdocs/langs/es_ES/errors.lang | 10 +++--- htdocs/langs/es_ES/margins.lang | 4 +-- htdocs/langs/es_ES/orders.lang | 12 +++---- htdocs/langs/es_ES/supplier_proposal.lang | 26 +++++++------- htdocs/langs/es_ES/suppliers.lang | 30 ++++++++-------- htdocs/langs/es_ES/workflow.lang | 4 +-- 7 files changed, 65 insertions(+), 65 deletions(-) diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 1736c591f63..4ff958a006c 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -8,11 +8,11 @@ ConfirmDeleteContact=¿Está seguro de querer eliminar este contacto y toda la i MenuNewThirdParty=Nuevo tercero MenuNewCustomer=Nuevo cliente MenuNewProspect=Nuevo cliente potencial -MenuNewSupplier=New vendor +MenuNewSupplier=Nuevo proveedor MenuNewPrivateIndividual=Nuevo particular -NewCompany=New company (prospect, customer, vendor) -NewThirdParty=New third party (prospect, customer, vendor) -CreateDolibarrThirdPartySupplier=Create a third party (vendor) +NewCompany=Nueva empresa (cliente potencial, cliente, proveedor) +NewThirdParty=Nuevo tercero (cliente potencial, cliente, proveedor) +CreateDolibarrThirdPartySupplier=Crear tercero (proveedor) CreateThirdPartyOnly=Crear tercero CreateThirdPartyAndContact=Crear un tercero + un contacto ProspectionArea=Área de prospección @@ -37,7 +37,7 @@ ThirdPartyProspectsStats=Clientes potenciales ThirdPartyCustomers=Clientes ThirdPartyCustomersStats=Clientes ThirdPartyCustomersWithIdProf12=Clientes con %s ó %s -ThirdPartySuppliers=Vendors +ThirdPartySuppliers=Proveedores ThirdPartyType=Tipo de tercero Individual=Particular ToCreateContactWithSameName=Creará automáticamente un contacto físico con la misma información. en la mayoría de casos. En la mayoría de los casos, incluso si el tercero es una persona física, la creación de un tercero por sí solo es suficiente. @@ -77,11 +77,11 @@ Web=Web Poste= Puesto DefaultLang=Idioma por defecto VATIsUsed=IVA está siendo usado -VATIsUsedWhenSelling=This define if this third party includes a sale tax or not when it makes an invoice to its own customers +VATIsUsedWhenSelling=Esto define si este tercero incluye IVA o no cuando realiza una factura a sus propios clientes. VATIsNotUsed=IVA no está siendo usado CopyAddressFromSoc=Copiar dirección de la empresa -ThirdpartyNotCustomerNotSupplierSoNoRef=Third party neither customer nor vendor, no available refering objects -ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Third party neither customer nor supplier, discounts are not available +ThirdpartyNotCustomerNotSupplierSoNoRef=Tercero ni cliente ni proveedor, no hay objetos de referencia disponibles +ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Tercero ni cliente ni proveedor, los descuentos no están disponibles. PaymentBankAccount=Cuenta bancaria de pago OverAllProposals=Presupuestos OverAllOrders=Pedidos @@ -99,9 +99,9 @@ LocalTax2ES=IRPF TypeLocaltax1ES=Tasa RE TypeLocaltax2ES=Tasa IRPF WrongCustomerCode=Código cliente incorrecto -WrongSupplierCode=Vendor code invalid +WrongSupplierCode=Código proveedor incorrecto CustomerCodeModel=Modelo de código cliente -SupplierCodeModel=Vendor code model +SupplierCodeModel=Modelo de código proveedor Gencod=Código de barras ##### Professional ID ##### ProfId1Short=Prof. id 1 @@ -267,7 +267,7 @@ Prospect=Cliente potencial CustomerCard=Ficha cliente Customer=Cliente CustomerRelativeDiscount=Descuento cliente relativo -SupplierRelativeDiscount=Relative vendor discount +SupplierRelativeDiscount=Descuento proveedor relativo CustomerRelativeDiscountShort=Descuento relativo CustomerAbsoluteDiscountShort=Descuento fijo CompanyHasRelativeDiscount=Este cliente tiene un descuento por defecto de %s%% @@ -284,8 +284,8 @@ HasCreditNoteFromSupplier=Tiene abonos para %s %s en este proveedor CompanyHasNoAbsoluteDiscount=Este cliente no tiene más descuentos fijos disponibles CustomerAbsoluteDiscountAllUsers=Descuentos fijos a clientes (acordado por todos los usuarios) CustomerAbsoluteDiscountMy=Descuentos fijos a clientes (acordados personalmente) -SupplierAbsoluteDiscountAllUsers=Absolute vendor discounts (entered by all users) -SupplierAbsoluteDiscountMy=Absolute vendor discounts (entered by yourself) +SupplierAbsoluteDiscountAllUsers=Descuentos fijos de proveedores (acordado por todos los usuarios) +SupplierAbsoluteDiscountMy=Descuentos fijos a proveedores (acordados personalmente) DiscountNone=Ninguna Supplier=Proveedor AddContact=Crear contacto @@ -304,13 +304,13 @@ DeleteACompany=Eliminar una empresa PersonalInformations=Información personal AccountancyCode=Cuenta contable CustomerCode=Código cliente -SupplierCode=Vendor code +SupplierCode=Código proveedor CustomerCodeShort=Código cliente -SupplierCodeShort=Vendor code +SupplierCodeShort=Código proveedor CustomerCodeDesc=Código único cliente para cada cliente -SupplierCodeDesc=Vendor code, unique for all vendors +SupplierCodeDesc=Código único proveedor para cada proveedor RequiredIfCustomer=Requerida si el tercero es un cliente o cliente potencial -RequiredIfSupplier=Required if third party is a vendor +RequiredIfSupplier=Requerida si el tercero es un proveedor ValidityControledByModule=Validación controlada por el módulo ThisIsModuleRules=Esta es la regla para este módulo ProspectToContact=Cliente potencial a contactar @@ -338,7 +338,7 @@ MyContacts=Mis contactos Capital=Capital CapitalOf=Capital de %s EditCompany=Modificar empresa -ThisUserIsNot=This user is not a prospect, customer nor vendor +ThisUserIsNot=Este usuario no es ni cliente potencial ni cliente ni proveedor VATIntraCheck=Verificar VATIntraCheckDesc=El link %s permite consultar al servicio europeo de control de números de IVA intracomunitario. Se requiere acceso a internet para que el servicio funcione VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do @@ -396,7 +396,7 @@ ImportDataset_company_4=Terceros/Comerciales (Asigna usuarios comerciales a terc PriceLevel=Nivel de precios DeliveryAddress=Dirección de envío AddAddress=Añadir dirección -SupplierCategory=Vendor category +SupplierCategory=Categoría proveedor JuridicalStatus200=Independiente DeleteFile=Eliminación de un archivo ConfirmDeleteFile=¿Está seguro de querer eliminar este archivo? @@ -406,7 +406,7 @@ FiscalYearInformation=Información del año fiscal FiscalMonthStart=Mes de inicio de ejercicio YouMustAssignUserMailFirst=Primero debe indicar un e-mail para este usuario para poder añadirlo en e-mails de notificaciones. YouMustCreateContactFirst=Para poder añadir notificaciones por e-mail, primero debe definir contactos con e-mails válidos en el tercero -ListSuppliersShort=List of vendors +ListSuppliersShort=Listado de proveedores ListProspectsShort=Listado de clientes potenciales ListCustomersShort=Listado de clientes ThirdPartiesArea=Área terceros y contactos @@ -420,7 +420,7 @@ CurrentOutstandingBill=Riesgo alcanzado OutstandingBill=Importe máximo para facturas pendientes OutstandingBillReached=Importe máximo para facturas pendientes OrderMinAmount=Importe mínimo para pedido -MonkeyNumRefModelDesc=Return numero with format %syymm-nnnn for customer code and %syymm-nnnn for vendor code where yy is year, mm is month and nnnn is a sequence with no break and no return to 0. +MonkeyNumRefModelDesc=Devuelve un número con formato %syymm-nnnn para el código del cliente y %syymm-nnnn para el código del proveedor donde yy es año, mm es mes y nnnn es una secuencia sin interrupción y sin retorno a 0. LeopardNumRefModelDesc=Código de cliente/proveedor libre sin verificación. Puede ser modificado en cualquier momento. ManagingDirectors=Administrador(es) (CEO, director, presidente, etc.) MergeOriginThirdparty=Tercero duplicado (tercero que debe eliminar) @@ -431,4 +431,4 @@ SaleRepresentativeLogin=Inicio de sesión del comercial SaleRepresentativeFirstname=Nombre del comercial SaleRepresentativeLastname=Apellidos del comercial ErrorThirdpartiesMerge=Se produjo un error al eliminar los terceros. Por favor, compruebe el log. Los cambios han sido anulados. -NewCustomerSupplierCodeProposed=New customer or vendor code suggested on duplicate code +NewCustomerSupplierCodeProposed=Nuevo código de cliente o proveedor sugerido duplicado diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 26902fa0858..422ee5c7fc8 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -32,9 +32,9 @@ ErrorBarCodeRequired=Código de barras requerido ErrorCustomerCodeAlreadyUsed=Código de cliente ya utilizado ErrorBarCodeAlreadyUsed=El código de barras ya está siendo utilizado ErrorPrefixRequired=Prefijo obligatorio -ErrorBadSupplierCodeSyntax=Bad syntax for vendor code -ErrorSupplierCodeRequired=Vendor code required -ErrorSupplierCodeAlreadyUsed=Vendor code already used +ErrorBadSupplierCodeSyntax=La sintaxis del código de proveedor es incorrecta +ErrorSupplierCodeRequired=Código de proveedor obligatorio +ErrorSupplierCodeAlreadyUsed=Código de cliente ya utilizado ErrorBadParameters=Parámetros incorrectos ErrorBadValueForParameter=valor '%s' incorrecto para el parámetro '%s' ErrorBadImageFormat=El archivo de imagen es de un formato no soportado (Su PHP no soporta las funciones de conversión de este formato de imagen) @@ -87,7 +87,7 @@ ErrorsOnXLines=Errores en %s líneas fuente ErrorFileIsInfectedWithAVirus=¡El antivirus no ha podido validar este archivo (es probable que esté infectado por un virus)! ErrorSpecialCharNotAllowedForField=Los caracteres especiales no son admitidos por el campo "%s" ErrorNumRefModel=Hay una referencia en la base de datos (%s) y es incompatible con esta numeración. Elimine la línea o renombre la referencia para activar este módulo. -ErrorQtyTooLowForThisSupplier=Quantity too low for this vendor or no price defined on this product for this supplier +ErrorQtyTooLowForThisSupplier=Cantidad demasiado baja para este proveedor o ningún precio definido en este producto para este proveedor ErrorModuleSetupNotComplete=La configuración del módulo parece incompleta. Vaya a Inicio - Configuración - Módulos para completarla. ErrorBadMask=Error en la máscara ErrorBadMaskFailedToLocatePosOfSequence=Error, sin número de secuencia en la máscara @@ -177,7 +177,7 @@ ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Definición incorrecta de la mat ErrorSavingChanges=Ha ocurrido un error al guardar los cambios ErrorWarehouseRequiredIntoShipmentLine=El almacén es obligatorio en la línea a enviar ErrorFileMustHaveFormat=El archivo debe tener el formato %s -ErrorSupplierCountryIsNotDefined=Country for this vendor is not defined. Correct this first. +ErrorSupplierCountryIsNotDefined=El país para este proveedor no está definido. Corrija esto primero. ErrorsThirdpartyMerge=No se han podido fusionar los dos registros. Petición cancelada. ErrorStockIsNotEnoughToAddProductOnOrder=No hay stock suficiente del producto %s para añadirlo a un nuevo pedido. ErrorStockIsNotEnoughToAddProductOnInvoice=No hay stock suficiente del producto %s para añadirlo a una nueva factura. 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 From 9b844df3154e19c6eb9bc4d3f07c6600fdfd4d35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Dec 2018 18:44:58 +0100 Subject: [PATCH 07/26] FIX Extrafields on shipment module --- htdocs/expedition/list.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 14f9eb41f44..95f6dbd616b 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -69,6 +69,8 @@ $pagenext = $page + 1; $viewstatut=GETPOST('viewstatut'); +$object = new Expedition($db); + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('shipmentlist')); $extrafields = new ExtraFields($db); From 003c463ee452ac46f6a3f12251e925a07f9bebe7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Dec 2018 19:23:53 +0100 Subject: [PATCH 08/26] FIX Can't delete a line of minimal stock per warehouse --- .../class/productstockentrepot.class.php | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index cbca4e5854d..1d4691d5ff3 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -157,13 +157,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; @@ -171,23 +170,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; @@ -198,8 +196,6 @@ class ProductStockEntrepot extends CommonObject $this->seuil_stock_alerte = $obj->seuil_stock_alerte; $this->desiredstock = $obj->desiredstock; $this->import_key = $obj->import_key; - - } // Retreive all extrafield From efb88292dda9b1632a9af18977cfc586cb5ac66d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Dec 2018 19:30:54 +0100 Subject: [PATCH 09/26] Clean code --- htdocs/product/stock/product.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 7c18dc11281..f93482caf94 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -83,7 +83,7 @@ if ($id > 0 || ! empty($ref)) } -if(empty($id) && !empty($object->id)) $id = $object->id; +if(empty($id) && !empty($object->id)) $id = $object->id; $modulepart='product'; @@ -130,7 +130,7 @@ 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')) > 0) { // Update $pse->seuil_stock_alerte = $seuil_stock_alerte; @@ -159,7 +159,7 @@ if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->c { $pse = new ProductStockEntrepot($db); - $pse->fetch(GETPOST('fk_productstockwarehouse')); + $pse->fetch(GETPOST('fk_productstockwarehouse','int')); if($pse->delete($user) > 0) setEventMessage($langs->trans('ProductStockWarehouseDeleted')); $action = ''; @@ -989,8 +989,8 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) print ""; - if (!empty($user->rights->produit->creer)){ - print ''; + if (!empty($user->rights->produit->creer)){ + print ''; } } From d8b5cd4bdfe13c4094bcd3271fb994bc70223ca3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Dec 2018 19:31:59 +0100 Subject: [PATCH 10/26] Remove white lines --- htdocs/product/stock/product.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index f93482caf94..01ca0bb37e6 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -131,23 +131,18 @@ if ($action == 'addlimitstockwarehouse' && !empty($user->rights->produit->creer) $pse = new ProductStockEntrepot($db); if($pse->fetch(0, $id, GETPOST('fk_entrepot')) > 0) { - // Update $pse->seuil_stock_alerte = $seuil_stock_alerte; $pse->desiredstock = $desiredstock; if($pse->update($user) > 0) setEventMessage($langs->trans('ProductStockWarehouseUpdated')); - } else { - // Create $pse->fk_entrepot = GETPOST('fk_entrepot'); $pse->fk_product = $id; $pse->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $pse->desiredstock = GETPOST('desiredstock'); if($pse->create($user) > 0) setEventMessage($langs->trans('ProductStockWarehouseCreated')); - } - } header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); @@ -161,9 +156,7 @@ if($action == 'delete_productstockwarehouse' && !empty($user->rights->produit->c $pse = new ProductStockEntrepot($db); $pse->fetch(GETPOST('fk_productstockwarehouse','int')); if($pse->delete($user) > 0) setEventMessage($langs->trans('ProductStockWarehouseDeleted')); - $action = ''; - } // Set stock limit @@ -916,7 +909,6 @@ if ($resql) } } $i++; - } } else dol_print_error($db); From af4405c669043f6a5f3845731fde6aa1ad241eb3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Dec 2018 20:29:08 +0100 Subject: [PATCH 11/26] FIX Replenishment with option STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE --- htdocs/langs/en_US/stocks.lang | 2 ++ htdocs/product/stock/replenish.php | 49 ++++++++++++++++-------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 0d22a3b3c75..da00add3711 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/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 3bc2bcdd85c..bb7f5f0539e 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -288,22 +288,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') . ')'; @@ -325,7 +323,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' ; } @@ -364,7 +362,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.'))))'; @@ -396,7 +394,6 @@ if (empty($resql)) dol_print_error($db); exit; } -//print $sql; $num = $db->num_rows($resql); $i = 0; @@ -505,9 +502,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 '
'. ''. ''. @@ -528,7 +528,7 @@ if (!empty($conf->service->enabled) && $type == 1) print ' '; print ' '; print '' . $langs->trans('AlertOnly') . ' '; -print '' . $langs->trans('Draft') . ' '; +print '' . $langs->trans('IncludeAlsoDraftOrders') . ' '; print ' '; print ''; $searchpicto=$form->showFilterAndCheckAddButtons(0); @@ -600,20 +600,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'; @@ -653,12 +656,12 @@ while ($i < ($limit ? min($num, $limit) : $num)) } // Desired stock - print '' . $objp->desiredstock . ''; + print '' . $desiredstock . ''; - // Limit stock for alerr - print '' . $objp->alertstock . ''; + // Limit stock for alert + print '' . $alertstock . ''; - // Current stock + // Current stock (all warehouses) print ''. $warning . $stock. ''; // Already ordered From f728b28a67ba25b480f05ad7a214d80959828369 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 17 Dec 2018 06:02:29 +0100 Subject: [PATCH 12/26] FIX: Missing information on Agiris Export --- htdocs/accountancy/class/accountancyexport.class.php | 3 +++ 1 file changed, 3 insertions(+) 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; } From 1aadcc50f11ae2174264c2a69c604bfdaf4f9b12 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Mon, 17 Dec 2018 15:48:27 +0100 Subject: [PATCH 13/26] Fix attached files from user mail form don't work --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 9d9b73bad09..0df6eb804c4 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -602,7 +602,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 From 48162db33d90d31c080e26c7bdfa9412f43c8376 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 17 Dec 2018 20:19:11 +0100 Subject: [PATCH 14/26] FIX Rename of image file lose the thumbs --- htdocs/core/actions_linkedfiles.inc.php | 7 +++++-- htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 58f96b7faf1..f23844e5d3d 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/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 8c62a74024c..1606cc3a7c0 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1845,6 +1845,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 du module Resource UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). From 3ae03d619d16632a5d76d712b80f9c9c2cdb4759 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 11:03:23 +0100 Subject: [PATCH 15/26] Fix tooltip --- htdocs/website/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ''; $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 ''; @@ -2606,7 +2606,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') 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 ''; @@ -2636,8 +2636,8 @@ if ($action == 'editmeta' || $action == 'createcontainer') } 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 ''; From 16496218d39e762981ac97030d81fed18d601a90 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 13:21:00 +0100 Subject: [PATCH 16/26] css --- htdocs/core/boxes/box_produits.php | 6 +++--- htdocs/core/boxes/box_services_contracts.php | 4 ++-- htdocs/theme/eldy/style.css.php | 7 +++++-- htdocs/theme/md/img/menus/ticket.png | Bin 916 -> 209 bytes htdocs/theme/md/img/object_ticket.png | Bin 520 -> 344 bytes htdocs/theme/md/style.css.php | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) 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/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 84d065280cb..3eb3163ae5d 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1074,10 +1074,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 98beeaf593ac4baf79eb72d410a706d124a1ed7c..98a482c47011e3a76ddd3a985879869a241c23e3 100644 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&Vd9T(EcfWS|IVfk$L9 z0|Q?v2s7?X4m1J^vX^-Jy0SlF;pbv94PM!L0w@&c>Eak-aXL9cBItpAt*_=;Cec;d9;E&I!tPuXH#PL0w3 vzi``hX?J0>cLsm{|NmbvbT&gGs?~(ytE{h`R;nVkdg00002VoOIv0063u zBQgL0010qNS#tmY4c7nw4c7reD4Tcy000McNliru;sXv72QWw9ricIl10_jBK~zY` z&6Q0|lvfmnpAU3|aZqCs44nY#v{Xbb5-?PvCPqz&37d*d+J#%%CT>^|ckPO#ach$X zcWf$YH%(z@+DIx%Z7HUrf(dA({DhJygz`7@bTJTSo&wJhr|8)eG z5#w=?eEm{$d55{c93s5S0)xTQYZOPQB#+-%3IN&uo;26g_MiuZo4;bJ< zu$V#Lpq^2l1k39fjeE&M0Pggf13q=!IaTKz_o)M3b0>g@yky)+cn9mYRm9s&P)G}n z6o!j~KxH_drkgLBWH@A>(r_-FPyp>}&nIo4!wNt!!zd72mDei4VRi%K;Vi`xQLd)dA1rc}C`+V5 zbR5{t;cS8kIV4$YYJr4D0X#|~TuDcgBsoN~35Iw@F01OB;w})S27nr(z+G1LUqmji z7|JGi$ShEneySivA06zX8h~nc(LrC3Nb=qQwKmD{oD-3 z!pvgIfq4eA2!drMfpeV9ob(0vDK&1KQtq?Xej4qzo8u#YirZNDFc zfwX1WU_)r4SYoRqYOl3hIYNsQ>Vh5Cn4g8@d%~~$OP#P~YqO4d-RG)4@l(%w#B$3$ z;#oiOv8vC#ZtR~OztLV7O~;IPyyHwbTeR24fAeV+d&8H`I`6Wo%g#INOK(`b$=9|8 qNeQ*oaDr-}pI`ZfpMyX6U&h~dzpw7?&g63d0000bfY3D}R8H&jKqXB1fZl6|kfc zltaOocL!*i=0-$L0Gl=hzCs93s%nd%nH^_vm<61>`#Yd>PyouZe26iMyH5w=s#>&d zt94!9E+(q#y_sFi5(nTirSvik!}DUIyT6**=j@IKe2d7Nh{Q#(@B8h(NlvSVY1RL{ qqpdN!`)>5coE>(WQu;aIlk*GW5>UQdU?z?L0000T)As^H^U+sInh$rLZ%GCccLZLz8{*XDOaC}+Bk{ z_2n(fErVrSD}V2Fc8zHqj|&AY%oosMa_~92^Igv8=tH;3!58Srdu1x~Aw^G%_IC8+ zQjY#S*YqMqkIH;xrb`LyLP1J_6)dAS$1+x=6uHcG)1`DGbxn$WwS~J)yJI=OS22I@ zt1aA-Vh?N3)-)&W;Gq;xjlBG9=H?PUH96C|d#|qGkxoeWv2*fsno)gyR*DB05%EUj z_;rqx-dg}Y^wbI??I@}ohGiLhRb>OBc4g=gXtST{crpN`00p5s)=B200000 LNkvXXu0mjfGT7ki diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 7e4d8ec11d2..f4eb9da3759 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1990,7 +1990,7 @@ div.login_block { vertical-align: middle; background: rgb(); width: 228px; - height: 43px; + height: 45px; display: none; From c3eb13105409ac05b7e19684dac26e5b736781b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 13:30:22 +0100 Subject: [PATCH 17/26] Debug ticket module --- htdocs/langs/en_US/agenda.lang | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index cd39a43abe8..95fadf00b68 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -92,6 +92,9 @@ EXPENSE_REPORT_REFUSEDInDolibarr=Expense report %s refused PROJECT_CREATEInDolibarr=Project %s created PROJECT_MODIFYInDolibarr=Project %s modified PROJECT_DELETEInDolibarr=Project %s deleted +TICKET_CREATEInDolibarr=Ticket %s created +TICKET_MODIFYInDolibarr=Ticket %s modified +TICKET_DELETEInDolibarr=Ticket %s deleted ##### End agenda events ##### AgendaModelModule=Document templates for event DateActionStart=Start date From 57c41bac5660a613d72b430d82be25b120bbd3cd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 15:06:00 +0100 Subject: [PATCH 18/26] Fix parameter session_cache_limiter --- htdocs/core/js/lib_foot.js.php | 4 +-- htdocs/core/js/lib_gravatar.js.php | 4 +-- htdocs/core/js/lib_head.js.php | 4 +-- htdocs/core/js/lib_notification.js.php | 2 +- htdocs/core/js/timepicker.js.php | 4 +-- .../template/css/mymodule.css.php | 6 ++-- htdocs/public/ticket/index.php | 2 +- htdocs/theme/eldy/style.css.php | 4 +-- htdocs/theme/md/style.css.php | 4 +-- htdocs/ticket/css/styles.css.php | 28 +++++++------------ 10 files changed, 28 insertions(+), 34 deletions(-) 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/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/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/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 3eb3163ae5d..5421d713e78 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -59,7 +59,7 @@ $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'; @@ -71,7 +71,7 @@ if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSI // 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 diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f4eb9da3759..4a81142900b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -60,7 +60,7 @@ $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'; @@ -72,7 +72,7 @@ if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSI // 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 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; From 90e87fc4d9bcf56b8bf4c931e2ecb1da9a1de4cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 15:15:33 +0100 Subject: [PATCH 19/26] Fix cache --- htdocs/theme/eldy/style.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 5421d713e78..746ea68969d 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -71,7 +71,7 @@ if (empty($user->id) && ! empty($_SESSION['dol_login'])) $user->fetch('',$_SESSI // 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=10800, 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 From 2d2b95a0829ad4ab765d775eb4a6c1df9983fca9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 17:01:57 +0100 Subject: [PATCH 20/26] Fix calculation of top menu entry of user --- htdocs/theme/eldy/style.css.php | 7 ++++++- htdocs/theme/md/style.css.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 746ea68969d..ea24aaf20b0 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -65,7 +65,12 @@ 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 diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 4a81142900b..30c781c2bfe 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -66,7 +66,12 @@ 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 From 2e6a41228f799a61d6a0fb1f0e4db37e71b88b65 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 20:49:48 +0100 Subject: [PATCH 21/26] Fix removing constant no more required --- htdocs/core/modules/modAccounting.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 42cd67b9dab..ef152521969 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -80,7 +80,7 @@ class modAccounting extends DolibarrModules "MAIN_COMPANY_CODE_ALWAYS_REQUIRED", "chaine", "1", - "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0 + "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 1 ); $this->const[2] = array( "MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED", From 31d032d5d36c74f1d3a6653832b75dd0cac1b5ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 21:00:06 +0100 Subject: [PATCH 22/26] FIX Can't create a thirdparty from member if customer code is mandatory. --- htdocs/adherents/subscription.php | 10 +++++++++- htdocs/societe/class/societe.class.php | 13 +++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index b0b450b10a1..dcad54e535f 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -120,7 +120,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) { @@ -854,6 +854,14 @@ 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"'); + } print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a240c83b89f..4b1f9053353 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3244,12 +3244,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='') { global $user,$langs; @@ -3274,7 +3275,7 @@ class Societe extends CommonObject $this->skype=$member->skype; $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(); From f2318716ecc06cb9641f022981d960d6881a90af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 21:27:16 +0100 Subject: [PATCH 23/26] FIX Error reported when creation of thirdparty from member fails --- htdocs/adherents/class/adherent.class.php | 5 +++-- htdocs/adherents/subscription.php | 3 ++- htdocs/core/class/commonobject.class.php | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index a5ca1691096..9d61ea07afa 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -586,13 +586,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 dcad54e535f..53d1ff60836 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -359,7 +359,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && ! $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang); $outputlangs->loadLangs(array("main", "members")); - // Get email content fro mtemplae + // Get email content from templae $arraydefaultmessage=null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION; @@ -862,6 +862,7 @@ if ($rowid > 0) $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/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c9b01a6a49d..676e76fe16a 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4848,6 +4848,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; } @@ -6142,7 +6143,7 @@ abstract class CommonObject if (! is_object($form)) $form=new Form($db); $out = ''; - + if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) { $out .= "\n"; @@ -6156,7 +6157,7 @@ abstract class CommonObject && empty($extrafields->attributes[$this->table_element]['list'][$key]) && $mode == 'view'){ continue; } - + $enabled = 1; if ($enabled && isset($extrafields->attributes[$this->table_element]['list'][$key])) { From 6851232314effbe5cbd3cf44e211547e7e7a26b1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 20:49:48 +0100 Subject: [PATCH 24/26] Fix removing constant no more required --- htdocs/core/modules/modAccounting.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index 325c504af42..c587ef72cdd 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -80,7 +80,7 @@ class modAccounting extends DolibarrModules "MAIN_COMPANY_CODE_ALWAYS_REQUIRED", "chaine", "1", - "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0 + "With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 1 ); $this->const[2] = array( "MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED", From b8429c607ed6a66bf42be81189a07ffac4766994 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 21:00:06 +0100 Subject: [PATCH 25/26] FIX Can't create a thirdparty from member if customer code is mandatory. --- htdocs/adherents/subscription.php | 10 +++++++++- htdocs/societe/class/societe.class.php | 13 +++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 5a50c92f3e9..94b101b4de5 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -120,7 +120,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights { // Creation user $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) { @@ -1011,6 +1011,14 @@ 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"'); + } print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1); } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index eaf62bc89ca..1cf8b211d48 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3079,12 +3079,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='') { global $user,$langs; @@ -3107,7 +3108,7 @@ class Societe extends CommonObject $this->skype=$member->skype; $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(); From 4b6ae9d42402844f8b37fc2a9ef7e0a63d1cedcf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Dec 2018 21:27:16 +0100 Subject: [PATCH 26/26] FIX Error reported when creation of thirdparty from member fails Conflicts: htdocs/adherents/subscription.php htdocs/core/class/commonobject.class.php --- htdocs/adherents/class/adherent.class.php | 5 +++-- htdocs/adherents/subscription.php | 1 + htdocs/core/class/commonobject.class.php | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 8736500757f..11fb1a1a111 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -582,13 +582,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 94b101b4de5..60969908a44 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -1019,6 +1019,7 @@ if ($rowid > 0) $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/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 32a528c27dc..f2175962c78 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4579,6 +4579,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; }