From fc1d8a2c5bf134ed04f9d26b7f2abaa73dfc8251 Mon Sep 17 00:00:00 2001 From: ibuiv <50403308+ibuiv@users.noreply.github.com> Date: Tue, 2 Feb 2021 10:01:54 +0100 Subject: [PATCH 1/8] FIX(path) htdocs removed --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index d7af9b46470..14589374e3d 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3234,7 +3234,7 @@ class CommandeFournisseur extends CommonOrder { if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines) > 0) { - require_once DOL_DOCUMENT_ROOT.'/htdocs/product/class/product.class.php'; + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $date_liv = dol_now(); // Build array with quantity deliverd by product From 3b050c34520fd072a95c529a920af50373ce0eca Mon Sep 17 00:00:00 2001 From: lvessiller Date: Tue, 2 Feb 2021 10:34:33 +0100 Subject: [PATCH 2/8] FIX select default mail template --- htdocs/core/class/html.formmail.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 855ce1ed7ad..d19269ffd5f 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -455,9 +455,11 @@ class FormMail extends Form // Zone to select email template if (count($modelmail_array) > 0) { + $model_mail_selected_id = GETPOSTISSET('modelmailselected') ? GETPOST('modelmailselected', 'int') : $arraydefaultmessage->id; + // If list of template is filled $out .= '
'."\n"; - $out .= ''.$langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, 0, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100'); + $out .= ''.$langs->trans('SelectMailModel').': '.$this->selectarray('modelmailselected', $modelmail_array, $model_mail_selected_id, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100'); if ($user->admin) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFrom", $langs->transnoentitiesnoconv('Setup').' - '.$langs->transnoentitiesnoconv('EMails')), 1); $out .= '   '; $out .= ''; From 506ba822e97969b7e1c018df5c39e179962b6402 Mon Sep 17 00:00:00 2001 From: kamel Date: Tue, 2 Feb 2021 11:06:01 +0100 Subject: [PATCH 3/8] FIX: Select transport mode function when create a supplier invoice and add unique key to the table llx_c_transport_mode in migrate sql --- htdocs/fourn/facture/card.php | 2 +- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 00e0e33ea1e..3ff3d72e810 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2095,7 +2095,7 @@ if ($action == 'create') { $langs->loadLangs(array("intracommreport")); print ''.$langs->trans('IntracommReportTransportMode').''; - $form->selectModeTransport(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id'); + $form->selectTransportMode(isset($_POST['transport_mode_id']) ? $_POST['transport_mode_id'] : $transport_mode_id, 'transport_mode_id'); print ''; } diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 96a681d4c56..ae9f1f901b7 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -123,6 +123,7 @@ CREATE TABLE llx_c_transport_mode ( label varchar(255) NOT NULL, active tinyint DEFAULT 1 NOT NULL ) ENGINE=innodb; +ALTER TABLE llx_c_transport_mode ADD UNIQUE INDEX uk_c_transport_mode (code, entity); INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('MAR', 'Transport maritime (y compris camions ou wagons sur bateau)', 1); INSERT INTO llx_c_transport_mode (code, label, active) VALUES ('TRA', 'Transport par chemin de fer (y compris camions sur wagon)', 1); From 3132877349a342e0d52a7834b822cc647e7f76e1 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 2 Feb 2021 23:09:23 +0100 Subject: [PATCH 4/8] FIX cash fence for takepos with multientity --- htdocs/takepos/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 51b6334a2c9..2182973a219 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -730,10 +730,9 @@ $( document ).ready(function() { else print "TerminalsDialog();"; } if ($conf->global->TAKEPOS_CONTROL_CASH_OPENING) - { - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE "; - $sql .= "date(date_creation) = CURDATE() "; - $sql .= ""; + $sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; + $sql .= " entity = ".$conf->entity." AND "; + $sql .= " date(date_creation) = CURDATE()"; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); @@ -917,8 +916,9 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { ); } -$sql = "SELECT rowid, status FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE "; -$sql .= "date(date_creation) = CURDATE() "; +$sql = "SELECT rowid, status, entity FROM ".MAIN_DB_PREFIX."pos_cash_fence WHERE"; +$sql .= " entity = ".$conf->entity." AND "; +$sql .= " date(date_creation) = CURDATE()"; $resql = $db->query($sql); if ($resql) { From c9e232f2ffb43bc475aa41601546836216ab0e24 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Feb 2021 18:00:27 +0100 Subject: [PATCH 5/8] Try to fix import/export timeout by dynamic increase --- htdocs/admin/system/phpinfo.php | 2 +- htdocs/exports/export.php | 7 ++++--- htdocs/imports/import.php | 8 ++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index a7bce7a3025..b6160d2d2e9 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -288,7 +288,7 @@ function getResultColumn($name, array $activated, array $loaded, array $function $html .= ' '.$langs->trans("PHPSupport", $name); } } else { - if (strtolower($name) == 'xdebug') $html .= yn(0); + if (strtolower($name) == 'xdebug') $html .= yn(0).' - '; else $html .= img_warning($langs->trans("ModuleActivated", "xdebug")); if (in_array(strtolower($name), $loaded)) { $html .= ' '.$langs->trans("Loaded").' - '; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index c9db970cd0b..c80ee4d248f 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -270,11 +270,12 @@ if ($step == 1 || $action == 'cleanselect') if ($action == 'builddoc') { - $max_execution_time_for_export = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined + $max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined $max_time = @ini_get("max_execution_time"); - if ($max_time && $max_time < $max_execution_time_for_export) + if ($max_time && $max_time < $max_execution_time_for_importexport) { - @ini_set("max_execution_time", $max_execution_time_for_export); // This work only if safe mode is off. also web servers has timeout of 300 + dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically."); + @ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300 } // Build export file diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index fbb17e15280..8814fa584fa 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1518,6 +1518,14 @@ if ($step == 5 && $datatoimport) } print '
'; } else { + $max_execution_time_for_importexport = (empty($conf->global->IMPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->IMPORT_MAX_EXECUTION_TIME); // 5mn if not defined + $max_time = @ini_get("max_execution_time"); + if ($max_time && $max_time < $max_execution_time_for_importexport) + { + dol_syslog("max_execution_time=".$max_time." is lower than max_execution_time_for_importexport=".$max_execution_time_for_importexport.". We try to increase it dynamically."); + @ini_set("max_execution_time", $max_execution_time_for_importexport); // This work only if safe mode is off. also web servers has timeout of 300 + } + // Launch import $arrayoferrors = array(); $arrayofwarnings = array(); From 348fd0fcb5ff8a2403240a9dadb0a9762d7e2ac7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Feb 2021 19:36:02 +0100 Subject: [PATCH 6/8] FIX #16160 --- htdocs/cashdesk/validation_verif.php | 2 +- htdocs/compta/facture/class/api_invoices.class.php | 2 +- htdocs/compta/index.php | 2 +- htdocs/compta/localtax/class/localtax.class.php | 5 ++--- htdocs/compta/localtax/index.php | 2 +- htdocs/compta/payment_sc/card.php | 4 ++-- htdocs/compta/prelevement/class/bonprelevement.class.php | 2 +- htdocs/compta/sociales/class/chargesociales.class.php | 8 ++++---- .../sociales/class/paymentsocialcontribution.class.php | 4 ++-- htdocs/compta/tva/class/tva.class.php | 4 ++-- htdocs/compta/tva/index.php | 2 +- htdocs/core/boxes/box_factures_fourn_imp.php | 2 +- .../modules/supplier_payment/doc/pdf_standard.modules.php | 2 +- htdocs/don/payment/card.php | 2 +- htdocs/expensereport/class/expensereport.class.php | 4 ++-- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/class/paiementfourn.class.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/fourn/facture/paiement.php | 2 +- htdocs/fourn/paiement/card.php | 2 +- htdocs/install/mysql/data/llx_c_action_trigger.sql | 2 +- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 3 +++ htdocs/install/mysql/migration/3.7.0-3.8.0.sql | 6 +++--- htdocs/install/mysql/migration/repair.sql | 2 +- htdocs/install/mysql/tables/llx_expensereport.sql | 2 +- htdocs/loan/class/loan.class.php | 6 +++--- htdocs/loan/list.php | 4 ++-- htdocs/loan/payment/card.php | 4 ++-- htdocs/public/payment/newpayment.php | 2 +- htdocs/public/payment/paymentok.php | 4 ++-- htdocs/societe/class/api_thirdparties.class.php | 2 +- 31 files changed, 48 insertions(+), 46 deletions(-) diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index 9468c395756..1df6f805ff6 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -318,7 +318,7 @@ switch ($action) if ($invoice->total_ttc == $obj_facturation->amountWithTax() && $obj_facturation->getSetPaymentMode() != 'DIFF') { - // We set status to payed + // We set status to paid $result = $invoice->set_paid($user); //print 'set paid';exit; } diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 19a5c8c287b..316f43bc011 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -1051,7 +1051,7 @@ class Invoices extends DolibarrApi } if ($this->invoice->paye) { - throw new RestException(500, 'Alreay payed'); + throw new RestException(500, 'Alreay paid'); } $this->invoice->fetch($id); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 1d4d1a37354..e161ab82e23 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -1090,7 +1090,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) } /* - * Unpayed supplier invoices + * Unpaid supplier invoices */ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index b14c567a01d..18367a04a46 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -381,7 +381,7 @@ class Localtax extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * localtax payed + * Total of localtax paid in invoice * * @param int $year Year * @return int ??? @@ -419,8 +419,7 @@ class Localtax extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * localtax payed - * Total de la localtax payed + * Total of localtax paid * * @param int $year Year * @return int ??? diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 7d48d6e1f2d..bedb7259184 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -565,7 +565,7 @@ print '
'; /* - * Payed + * Paid */ print load_fiche_titre($langs->transcountry($LTPaid, $mysoc->country_code), '', ''); diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 11c8512a265..78fa11fc70b 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -162,7 +162,7 @@ print dol_get_fiche_end(); /* - * List of social contributions payed + * List of social contributions paid */ $disable_delete = 0; @@ -213,7 +213,7 @@ if ($resql) print ''.price($objp->sc_amount).''; // Status print ''.$socialcontrib->getLibStatut(4, $objp->amount).''; - // Amount payed + // Amount paid print ''.price($objp->amount).''; print "\n"; if ($objp->paye == 1) // If at least one invoice is paid, disable delete diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index fb2f114b579..721d7c10111 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -370,7 +370,7 @@ class BonPrelevement extends CommonObject $num = count($facs); for ($i = 0; $i < $num; $i++) { - /* Tag invoice as payed */ + /* Tag invoice as paid */ dol_syslog(get_class($this)."::set_credite set_paid fac ".$facs[$i]); $fac = new Facture($this->db); $fac->fetch($facs[$i]); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index ffb2d04e155..a281aeb2198 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -421,7 +421,7 @@ class ChargeSociales extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag social contribution as payed completely + * Tag social contribution as paid completely * * @param User $user Object user making change * @return int <0 if KO, >0 if OK @@ -439,7 +439,7 @@ class ChargeSociales extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Remove tag payed on social contribution + * Remove tag paid on social contribution * * @param User $user Object user making change * @return int <0 if KO, >0 if OK @@ -459,7 +459,7 @@ class ChargeSociales extends CommonObject * Retourne le libelle du statut d'une charge (impaye, payee) * * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto - * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function getLibStatut($mode = 0, $alreadypaid = -1) @@ -473,7 +473,7 @@ class ChargeSociales extends CommonObject * * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto - * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function LibStatut($status, $mode = 0, $alreadypaid = -1) diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 2f4f772fca0..ca46bdadfea 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -110,7 +110,7 @@ class PaymentSocialContribution extends CommonObject * Use this->amounts to have list of lines for the payment * * @param User $user User making payment - * @param int $closepaidcontrib 1=Also close payed contributions to paid, 0=Do nothing more + * @param int $closepaidcontrib 1=Also close paid contributions to paid, 0=Do nothing more * @return int <0 if KO, id of payment if OK */ public function create($user, $closepaidcontrib = 0) @@ -178,7 +178,7 @@ class PaymentSocialContribution extends CommonObject { $amount = price2num($amount); - // If we want to closed payed invoices + // If we want to closed paid invoices if ($closepaidcontrib) { $contrib = new ChargeSociales($this->db); diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 51cac4c7394..4b97070cce6 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -413,7 +413,7 @@ class Tva extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * VAT payed + * Total of VAT paid into invoice * * @param int $year Year * @return double Amount @@ -451,7 +451,7 @@ class Tva extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Total of the VAT payed + * Total of the VAT paid * * @param int $year Year * @return double Amount diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 4a16d996ab8..576a9038165 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -543,7 +543,7 @@ print '
'; /* - * Payed + * Paid */ print load_fiche_titre($langs->trans("VATPaid"), '', ''); diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index d345f3d33b0..99848d916f4 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -26,7 +26,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** - * Class to manage the box to show not payed suppliers invoices + * Class to manage the box to show not paid suppliers invoices */ class box_factures_fourn_imp extends ModeleBoxes { 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 19e78eb4ff9..bcb90df2bb1 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -748,7 +748,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetFont('', '', $default_font_size - 1); $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L'); - // Payed + // Paid $thirdparty = $object->thirdparty; $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index c7c16ee970b..e827bca338d 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -184,7 +184,7 @@ if ($resql) print ''.price($objp->d_amount).''; // Status print ''.$don->getLibStatut(4, $objp->amount).''; - // Amount payed + // Amount paid print ''.price($objp->amount).''; print "\n"; if ($objp->paid == 1) { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index babe69206ce..ad55ec4b537 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -66,14 +66,14 @@ class ExpenseReport extends CommonObject public $date_fin; /** - * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied + * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied * * @var int Status */ public $status; /** - * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=payed, 99=denied + * 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied * * @var int Status * @deprecated diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index c8ae31398c0..83408d9ba6c 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1248,7 +1248,7 @@ class FactureFournisseur extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag invoice as a payed invoice + * Tag invoice as a paid invoice * * @param User $user Object user * @param string $close_code Code indicates whether the class has paid in full while payment is incomplete. Not implementd yet. diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 56d4af045f4..bb0ecbcfa7c 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -229,7 +229,7 @@ class PaiementFourn extends Paiement $invoice = new FactureFournisseur($this->db); $invoice->fetch($facid); - // If we want to closed payed invoices + // If we want to closed paid invoices if ($closepaidinvoices) { $paiement = $invoice->getSommePaiement(); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 00e0e33ea1e..ac8b7b75dbf 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -489,7 +489,7 @@ if (empty($reshook)) $result = $discountcheck->fetch(0, 0, $object->id); $canconvert = 0; - if ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discountcheck->id)) $canconvert = 1; // we can convert deposit into discount if deposit is payed (completely, partially or not at all) and not already converted (see real condition into condition used to show button converttoreduc) + if ($object->type == FactureFournisseur::TYPE_DEPOSIT && empty($discountcheck->id)) $canconvert = 1; // we can convert deposit into discount if deposit is paid (completely, partially or not at all) and not already converted (see real condition into condition used to show button converttoreduc) if (($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_STANDARD) && $object->paye == 0 && empty($discountcheck->id)) $canconvert = 1; // we can convert credit note into discount if credit note is not refunded completely and not already converted and amount of payment is 0 (see also the real condition used as the condition to show button converttoreduc) if ($canconvert) { diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 8a7e0cc8054..a7619cd84ac 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -511,7 +511,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if (empty($reshook)) { /* - * All unpayed supplier invoices + * All unpaid supplier invoices */ $sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.type, f.total_ht, f.total_ttc,'; $sql .= ' f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc,'; diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 06cff4b5c9e..355b84796f2 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -305,7 +305,7 @@ if ($result > 0) print ''.img_object($langs->trans('ShowCompany'), 'company').' '.$objp->name.''; // Expected to pay print ''.price($objp->total_ttc).''; - // Payed + // Paid print ''.price($objp->amount).''; // Status print ''.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).''; diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index eeca137dbc0..7390c3234a5 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -101,7 +101,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_CREATE','Expense report created','Executed when an expense report is created','expensereport',201); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',202); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',203); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAYED','Expense report billed','Executed when an expense report is set as billed','expensereport',204); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_PAID','Expense report billed','Executed when an expense report is set as billed','expensereport',204); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_VALIDATE','Expense report validated','Executed when an expense report is validated','expensereport',211); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('HOLIDAY_APPROVE','Expense report approved','Executed when an expense report is approved','expensereport',212); diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 96a681d4c56..2af0c3373c4 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -563,3 +563,6 @@ INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64); ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL; + + +UPDATE llx_c_action_trigger SET code = 'EXPENSE_REPORT_PAID' where code = 'EXPENSE_REPORT_PAYED'; diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index 00bf30f6672..c6325454b86 100644 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -248,7 +248,7 @@ CREATE TABLE llx_expensereport ( fk_user_approve integer DEFAULT NULL, fk_user_refuse integer DEFAULT NULL, fk_user_cancel integer DEFAULT NULL, - fk_statut integer NOT NULL, -- 1=brouillon, 2=validé (attente approb), 4=annulé, 5=approuvé, 6=payed, 99=refusé + fk_statut integer NOT NULL, -- 1=draft, 2=validate (waiting approbation), 4=cancel, 5=approved, 6=paid, 99=refused fk_c_paiement integer DEFAULT NULL, paid smallint DEFAULT 0 NOT NULL, note_public text, @@ -524,13 +524,13 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_PAYED','Customer invoice paid','Executed when a customer invoice is paid','facture',7); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_PAYED','Supplier invoice paid','Executed when a supplier invoice is paid','invoice_supplier',16); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20); diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 6d662e64893..6e9ea4601f8 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -509,7 +509,7 @@ UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NUL -- from llx_facturedet as fd, llx_facture as f where fd.fk_facture = f.rowid AND (total_ht - situation_percent / 100 * subprice * qty * (1 - (fd.remise_percent / 100))) > 0.01 and f.type = 5; --- Note to make all deposit as payed when there is already a discount generated from it. +-- Note to make all deposit as paid when there is already a discount generated from it. --drop table tmp_invoice_deposit_mark_as_available; --create table tmp_invoice_deposit_mark_as_available as select * from llx_facture as f where f.type = 3 and f.paye = 0 and f.rowid in (select fk_facture_source from llx_societe_remise_except); --update llx_facture set paye = 1, fk_statut = 2 where rowid in (select rowid from tmp_invoice_deposit_mark_as_available); diff --git a/htdocs/install/mysql/tables/llx_expensereport.sql b/htdocs/install/mysql/tables/llx_expensereport.sql index 772888620fb..d591de78436 100644 --- a/htdocs/install/mysql/tables/llx_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_expensereport.sql @@ -43,7 +43,7 @@ CREATE TABLE llx_expensereport ( fk_user_approve integer DEFAULT NULL, fk_user_refuse integer DEFAULT NULL, fk_user_cancel integer DEFAULT NULL, - fk_statut integer NOT NULL, -- 1=brouillon, 2=validated (waiting approval), 4=canceled, 5=approved, 6=payed, 99=refused + fk_statut integer NOT NULL, -- 1=brouillon, 2=validated (waiting approval), 4=canceled, 5=approved, 6=paid, 99=refused fk_c_paiement integer DEFAULT NULL, -- deprecated paid smallint default 0 NOT NULL, -- deprecated (status is used instead) note_public text, diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index ae683c829a5..1a888375bf3 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -377,7 +377,7 @@ class Loan extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Tag loan as payed completely + * Tag loan as paid completely * * @param User $user Object user making change * @return int <0 if KO, >0 if OK @@ -445,7 +445,7 @@ class Loan extends CommonObject * Return label of loan status (unpaid, paid) * * @param int $mode 0=label, 1=short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label - * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function getLibStatut($mode = 0, $alreadypaid = -1) @@ -459,7 +459,7 @@ class Loan extends CommonObject * * @param int $status Id status * @param int $mode 0=Label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label, 5=Short label + Picto - * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) + * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function LibStatut($status, $mode = 0, $alreadypaid = -1) diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 79e38dbdeb1..744a6929fc8 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -93,7 +93,7 @@ $help_url = ''; $title = $langs->trans('Loans'); $sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.paid,"; -$sql .= " SUM(pl.amount_capital) as alreadypayed"; +$sql .= " SUM(pl.amount_capital) as alreadypaid"; $sql .= " FROM ".MAIN_DB_PREFIX."loan as l LEFT JOIN ".MAIN_DB_PREFIX."payment_loan AS pl"; $sql .= " ON l.rowid = pl.fk_loan"; $sql .= " WHERE l.entity = ".$conf->entity; @@ -229,7 +229,7 @@ if ($resql) print ''.dol_print_date($db->jdate($obj->dateend), 'day').''; print ''; - print $loan_static->LibStatut($obj->paid, 5, $obj->alreadypayed); + print $loan_static->LibStatut($obj->paid, 5, $obj->alreadypaid); print ''; print ''; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 6aebd9fb33d..ac76dbf9053 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -149,7 +149,7 @@ print '
'; /* - * List of loans payed + * List of loans paid */ $disable_delete = 0; @@ -194,7 +194,7 @@ if ($resql) // print ''.price($objp->capital).''; // Status print ''.$loan->getLibStatut(4, $objp->amount_capital).''; - // Amount payed + // Amount paid $amount_payed = $objp->amount_capital + $objp->amount_insurance + $objp->amount_interest; print ''.price($amount_payed).''; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 1a643323dce..8672fa1c2bf 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1855,7 +1855,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment { $noidempotency_key = (GETPOSTISSET('noidempotency') ? GETPOST('noidempotency', 'int') : 0); // By default noidempotency is unset, so we must use a different tag/ref for each payment. If set, we can pay several times the same tag/ref. $paymentintent = $stripe->getPaymentIntent($amount, $currency, $tag, 'Stripe payment: '.$fulltag.(is_object($object) ? ' ref='.$object->ref : ''), $object, $stripecu, $stripeacc, $servicestatus, 0, 'automatic', false, null, 0, $noidempotency_key); - // The paymentintnent has status 'requires_payment_method' (even if paymentintent was already payed) + // The paymentintnent has status 'requires_payment_method' (even if paymentintent was already paid) //var_dump($paymentintent); if ($stripe->error) setEventMessages($stripe->error, null, 'errors'); } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 346e4003e4c..f4b9f0feb5b 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -614,7 +614,7 @@ if ($ispaymentok) $ispostactionok = -1; } } else { - $postactionmessages[] = 'Member '.$tmptag['MEM'].' for subscription payed was not found'; + $postactionmessages[] = 'Member '.$tmptag['MEM'].' for subscription paid was not found'; $ispostactionok = -1; } } elseif (array_key_exists('INV', $tmptag) && $tmptag['INV'] > 0) @@ -718,7 +718,7 @@ if ($ispaymentok) $ispostactionok = -1; } } else { - $postactionmessages[] = 'Invoice payed '.$tmptag['INV'].' was not found'; + $postactionmessages[] = 'Invoice paid '.$tmptag['INV'].' was not found'; $ispostactionok = -1; } } else { diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 81a1c167a02..3e8a6c91f92 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1068,7 +1068,7 @@ class Thirdparties extends DolibarrApi /** * Return list of invoices qualified to be corrected by a credit note. * Invoices matching the following rules are returned - * (validated + payment on process) or classified (payed completely or payed partialy) + not already replaced + not already a credit note + * (validated + payment on process) or classified (paid completely or paid partialy) + not already replaced + not already a credit note * * @param int $id Id of thirdparty * From 3798892fd3348ec66b555a089240af5a45e643b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Feb 2021 19:53:28 +0100 Subject: [PATCH 7/8] FIX Hide/Unhide external ICSS calendars --- htdocs/comm/action/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 016201be0f3..a603010f46a 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -514,7 +514,7 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on { $s .= '