From 40c79cb7cdcfb5d3e537fd7450a51db6fef70e6b Mon Sep 17 00:00:00 2001 From: atm-ph Date: Tue, 11 Sep 2018 17:56:11 +0200 Subject: [PATCH 01/11] Fix classname liencolht to linecolht --- htdocs/core/tpl/objectline_view.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index f1c691bf2a2..4a4b6692096 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -233,13 +233,13 @@ if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax=0; special_code == 3) { ?> trans('Option'); ?> - total_ht); ?> + total_ht); ?> multicurrency->enabled)) { ?> multicurrency_total_ht); ?> - total_ttc); ?> + total_ttc); ?> From aad6a0871f063bb5089ac4574b20c7c8234bbb8c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 10:57:09 +0200 Subject: [PATCH 02/11] FIX Lose filter on payment type or category after a sort on invoice list Conflicts: htdocs/compta/facture/list.php --- htdocs/compta/facture/list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index b813ed7c6da..2cfd1d03a0e 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -73,7 +73,7 @@ $search_product_category=GETPOST('search_product_category','int'); $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref','alpha'):GETPOST('search_ref','alpha'); $search_refcustomer=GETPOST('search_refcustomer','alpha'); $search_type=GETPOST('search_type','int'); -$search_project=GETPOST('search_project','alpha'); +$search_project=GETPOST('search_project','alpha');< $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_vat=GETPOST('search_montant_vat','alpha'); @@ -555,14 +555,14 @@ if ($resql) if ($search_zip) $param.='&search_zip='.urlencode($search_zip); if ($search_sale > 0) $param.='&search_sale=' .urlencode($search_sale); if ($search_user > 0) $param.='&search_user=' .urlencode($search_user); - if ($search_product_category > 0) $param.='$search_product_category=' .urlencode($search_product_category); + if ($search_product_category > 0) $param.='&search_product_category=' .urlencode($search_product_category); if ($search_montant_ht != '') $param.='&search_montant_ht='.urlencode($search_montant_ht); if ($search_montant_vat != '') $param.='&search_montant_vat='.urlencode($search_montant_vat); if ($search_montant_localtax1 != '') $param.='&search_montant_localtax1='.urlencode($search_montant_localtax1); if ($search_montant_localtax2 != '') $param.='&search_montant_localtax2='.urlencode($search_montant_localtax2); if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc); if ($search_status != '') $param.='&search_status='.urlencode($search_status); - if ($search_paymentmode > 0) $param.='search_paymentmode='.urlencode($search_paymentmode); + if ($search_paymentmode > 0) $param.='&search_paymentmode='.urlencode($search_paymentmode); if ($show_files) $param.='&show_files=' .urlencode($show_files); if ($option) $param.="&option=".urlencode($option); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); From 902bdf540e29e83a62f72baa600f8255495a3149 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 13:45:04 +0200 Subject: [PATCH 03/11] Update ChangeLog --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2f0d6538e7a..c379f2dfeff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -221,7 +221,8 @@ Following changes may create regressions for some external modules, but were nec * Remove method Categorie:get_nb_categories() that was not used. * Hook getnomurltooltip provide a duplicate feature compared to hook getNomUrl so all hooks getnomurltooltip are now replaced with hook getNomUrl. - +* The substitution key __CONTACTCIVNAME__ is no longer present, it has been replaced by __CONTACT_NAME_{TYPE}__ + where {TYPE} is contact type code (BILLING, SHIPPING, CUSTOMER, ... see contact type dictionnary). ***** ChangeLog for 7.0.3 compared to 7.0.2 ***** From 5bd2c01411d5e981565657f4440fcd15e4c81f53 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 14:43:05 +0200 Subject: [PATCH 04/11] Fix email missing in tooltip --- htdocs/societe/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 1bed6e635a0..b15042dd017 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -264,7 +264,7 @@ print '
'; * Last third parties modified */ $max=15; -$sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur"; +$sql = "SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur"; $sql.= ", s.code_client"; $sql.= ", s.code_fournisseur"; $sql.= ", s.logo"; @@ -313,6 +313,7 @@ if ($result) $thirdparty_static->code_client = $objp->code_client; $thirdparty_static->code_fournisseur = $objp->code_fournisseur; $thirdparty_static->canvas=$objp->canvas; + $thirdparty_static->email = $objp->email; print ''; // Name From 729d03862f69cfc0aeed9e936411ce092a778042 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 15:02:59 +0200 Subject: [PATCH 05/11] Fix warning --- htdocs/core/modules/modSyslog.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modSyslog.class.php b/htdocs/core/modules/modSyslog.class.php index fca192f5ec0..24f3a8d959f 100644 --- a/htdocs/core/modules/modSyslog.class.php +++ b/htdocs/core/modules/modSyslog.class.php @@ -82,7 +82,7 @@ class modSyslog extends DolibarrModules // Cronjobs $this->cronjobs = array( - 0=>array('label'=>'CompressSyslogs', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'compressSyslogs', 'parameters'=>'', 'comment'=>'Compress and archive log files', 'frequency'=>1, 'unitfrequency'=> 3600 * 24, 'priority'=>50, 'status'=>0, 'test'=>true), + 0=>array('label'=>'CompressSyslogs', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'compressSyslogs', 'parameters'=>'', 'comment'=>'Compress and archive log files. Warning, batch must be run with same account than your web server to avoid to get lof files with different owner than required by web server !', 'frequency'=>1, 'unitfrequency'=> 3600 * 24, 'priority'=>50, 'status'=>0, 'test'=>true), ); } } From 50478b1bd447c04144c61ccb6919905bf2e3844f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 15:21:11 +0200 Subject: [PATCH 06/11] FIX capital must be empty and not 0 if undefined --- htdocs/societe/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 419c007906a..e1f257cbf8f 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1962,7 +1962,7 @@ else // Capital print ''.fieldLabel('Capital','capital').''; print ' '.$langs->trans("Currency".$conf->currency).''; // Assign a Name From 9cbba2dc7dbcca5a0db431ce60d5507b4998e8b6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 15:28:59 +0200 Subject: [PATCH 07/11] Add log --- htdocs/adherents/class/adherent.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index a517ea8a18b..a10ab55ad58 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2599,6 +2599,7 @@ class Adherent extends CommonObject $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang); $outputlangs->loadLangs(array("main", "members")); + dol_syslog("sendReminderForExpiredSubscription Language set to ".$outputlangs->defaultlang); $arraydefaultmessage=null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION; From 48ae4de47b7791d1ffafabfd1ea88a7b282365d2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 16:11:10 +0200 Subject: [PATCH 08/11] FIX Add paypal error message in alert email --- htdocs/langs/en_US/paypal.lang | 3 ++- htdocs/public/payment/paymentok.php | 5 +++++ htdocs/public/paypal/paymentok.php | 9 +-------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/htdocs/langs/en_US/paypal.lang b/htdocs/langs/en_US/paypal.lang index 547b188b4a5..ad8b9612935 100644 --- a/htdocs/langs/en_US/paypal.lang +++ b/htdocs/langs/en_US/paypal.lang @@ -31,4 +31,5 @@ OnlinePaymentSystem=Online payment system PaypalLiveEnabled=Paypal live enabled (otherwise test/sandbox mode) PaypalImportPayment=Import Paypal payments PostActionAfterPayment=Post actions after payments -ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary. \ No newline at end of file +ARollbackWasPerformedOnPostActions=A rollback was performed on all Post actions. You must complete post actions manually if they are necessary. +ValidationOfPaymentFailed=Validation of payment has failed \ No newline at end of file diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index a5b6b38ea35..34209877bf3 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -801,6 +801,11 @@ if ($ispaymentok) $content.="
\n"; $content.="tag=".$fulltag."
\ntoken=".$onlinetoken."
\npaymentType=".$paymentType."
\ncurrencycodeType=".$currencyCodeType."
\npayerId=".$payerID."
\nipaddress=".$ipaddress."
\nFinalPaymentAmt=".$FinalPaymentAmt."
\n"; + if (! empty($ErrorCode)) $content.="ErrorCode = ".$ErrorCode."
\n"; + if (! empty($ErrorShortMsg)) $content.="ErrorShortMsg = ".$ErrorShortMsg."
\n"; + if (! empty($ErrorLongMsg)) $content.="ErrorLongMsg = ".$ErrorLongMsg."
\n"; + if (! empty($ErrorSeverityCode)) $content.="ErrorSeverityCode = ".$ErrorSeverityCode."
\n"; + $ishtml=dol_textishtml($content); // May contain urls require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; diff --git a/htdocs/public/paypal/paymentok.php b/htdocs/public/paypal/paymentok.php index 1e6adb7ca51..72a43dcbc7b 100644 --- a/htdocs/public/paypal/paymentok.php +++ b/htdocs/public/paypal/paymentok.php @@ -43,14 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; // Security check if (empty($conf->paypal->enabled)) accessforbidden('',0,0,1); -$langs->load("main"); -$langs->load("other"); -$langs->load("dict"); -$langs->load("bills"); -$langs->load("companies"); -$langs->load("paybox"); -$langs->load("paypal"); -$langs->load("stripe"); +$langs->loadLangs(array("main","other","dict","bills","companies","paybox","paypal","stripe")); // Clean parameters $PAYPAL_API_USER=""; From fd93a22dca12cfd5b588fa42022b92579b2f5667 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 16:45:12 +0200 Subject: [PATCH 09/11] Fix missing field --- htdocs/install/mysql/migration/5.0.0-6.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index d4526a8c8ae..5011554dd02 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -466,6 +466,7 @@ new_pmp double DEFAULT 0 )ENGINE=InnoDB; ALTER TABLE llx_inventory ADD COLUMN datec datetime DEFAULT NULL; +ALTER TABLE llx_inventory ADD COLUMN tms timestamp; ALTER TABLE llx_inventory ADD INDEX idx_inventory_tms (tms); ALTER TABLE llx_inventory ADD INDEX idx_inventory_datec (datec); From 77d7c9775039b8561447b5982c1e93e280aed0c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 17:18:27 +0200 Subject: [PATCH 10/11] Fix typo --- htdocs/langs/fr_FR/members.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 08a16745621..6cd379c3cc2 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -116,7 +116,7 @@ SendingEmailOnCancelation=Envoie d'email à l'annulation # Topic of email templates YourMembershipRequestWasReceived=Votre demande d'adhésion a été reçue. YourMembershipWasValidated=Votre adhésion a été enregistrée -YourSubscriptionWasRecorded=Votre nouvel adhésion a été enregistrée +YourSubscriptionWasRecorded=Votre nouvelle adhésion a été enregistrée SubscriptionReminderEmail=Rappel de cotisation YourMembershipWasCanceled=Votre adhésion a été annulée CardContent=Contenu de votre fiche adhérent From 3662ebe3a317e6028e229a502d71183a4fc29e61 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Sep 2018 18:05:20 +0200 Subject: [PATCH 11/11] Fix syntax error --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 2cfd1d03a0e..dbbdf5fa8b9 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -73,7 +73,7 @@ $search_product_category=GETPOST('search_product_category','int'); $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref','alpha'):GETPOST('search_ref','alpha'); $search_refcustomer=GETPOST('search_refcustomer','alpha'); $search_type=GETPOST('search_type','int'); -$search_project=GETPOST('search_project','alpha');< +$search_project=GETPOST('search_project','alpha'); $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_vat=GETPOST('search_montant_vat','alpha');