diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0776efff98a..22429de9200 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2767,7 +2767,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); + dol_syslog("sendReminderForExpiredSubscription Language for member id ".$adherent->id." set to ".$outputlangs->defaultlang." mysoc->default_lang=".$mysoc->default_lang); $arraydefaultmessage=null; $labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 605a35aef3d..d72d6ce8978 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -673,7 +673,7 @@ if ($rowid > 0) $sql.= " c.datef,"; $sql.= " c.fk_bank,"; $sql.= " b.rowid as bid,"; - $sql.= " ba.rowid as baid, ba.label, ba.bank, ba.ref, ba.account_number, ba.fk_accountancy_journal, ba.number"; + $sql.= " ba.rowid as baid, ba.label, ba.bank, ba.ref, ba.account_number, ba.fk_accountancy_journal, ba.number, ba.currency_code"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."subscription as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON c.fk_bank = b.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; @@ -726,8 +726,9 @@ if ($rowid > 0) $accountstatic->id=$objp->baid; $accountstatic->number=$objp->number; $accountstatic->account_number=$objp->account_number; + $accountstatic->currency_code=$objp->currency_code; - if (! empty($conf->accounting->enabled)) + if (! empty($conf->accounting->enabled) && $objp->fk_accountancy_journal > 0) { $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($objp->fk_accountancy_journal); diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 06f39550c8e..7b37e7112f3 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -35,14 +35,15 @@ $what=GETPOST('what', 'alpha'); $export_type=GETPOST('export_type', 'alpha'); $file=GETPOST('filename_template', 'alpha'); +// Load variable for pagination +$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST("page", 'int'); +if (empty($page) || $page == -1 || GETPOST('button_search','alpha') || GETPOST('button_removefilter','alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +$offset = $limit * $page; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; -if ($page < 0) { $page = 0; } -$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; -$offset = $limit * $page; if (! $user->admin) accessforbidden(); diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 1366223a7d4..266319345da 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -187,7 +187,7 @@ MembersStatisticsByProperties=Members statistics by nature MembersByNature=This screen show you statistics on members by nature. MembersByRegion=This screen show you statistics on members by region. VATToUseForSubscriptions=VAT rate to use for subscriptions -NoVatOnSubscription=No TVA for subscriptions +NoVatOnSubscription=No VAT for subscriptions ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for subscription line into invoice: %s NameOrCompany=Name or company SubscriptionRecorded=Subscription recorded @@ -195,4 +195,5 @@ NoEmailSentToMember=No email sent to member EmailSentToMember=Email sent to member at %s SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5') -MembershipPaid=Membership paid for current period (until %s) \ No newline at end of file +MembershipPaid=Membership paid for current period (until %s) +YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email \ No newline at end of file diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 6a24a9a2f64..794de3f0efc 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -195,3 +195,4 @@ NoEmailSentToMember=Aucun e-mail envoyé à l'adhérent EmailSentToMember=Email envoyé à l'adhérent à %s SendReminderForExpiredSubscriptionTitle=Envoyer une relance par mail pour les cotisations expirées SendReminderForExpiredSubscription=Envoyer un rappel par e-mail aux membres lorsque l'adhésion est sur le point d'expirer (le paramètre est le nombre de jours avant la fin de l'adhésion pour envoyer le rappel. Il peut s'agir d'une liste de jours séparé par un point-virgule, par exemple '10;5;0;-5') +YouMayFindYourInvoiceInThisEmail=You pourrez trouver votre facture en pièce jointe à cet email \ No newline at end of file diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a9cf2802eb2..a6ec423903e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3439,6 +3439,7 @@ class Societe extends CommonObject $this->capital=empty($conf->global->MAIN_INFO_CAPITAL)?'':$conf->global->MAIN_INFO_CAPITAL; $this->forme_juridique_code=empty($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE)?'':$conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE; $this->email=empty($conf->global->MAIN_INFO_SOCIETE_MAIL)?'':$conf->global->MAIN_INFO_SOCIETE_MAIL; + $this->default_lang = (empty($conf->global->MAIN_LANG_DEFAULT)?'auto':$conf->global->MAIN_LANG_DEFAULT); $this->logo=empty($conf->global->MAIN_INFO_SOCIETE_LOGO)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO; $this->logo_small=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL; $this->logo_mini=empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 6e6e02998c3..034315fdc10 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -65,10 +65,13 @@ $version=DOL_VERSION; $error=0; + /* * Main */ +$langs->loadLangs(array('main', 'dict')); + // current date $now=dol_now();