diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 2ce7d5c110d..56dfd753911 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -558,7 +558,7 @@ if ($object->fetch($id) >= 0) { if ($object->statut < 2) { - print ''; + print ''; print $langs->trans("NoTargetYet"); print ''; } diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index f1cae70fec5..2bcd227827e 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -962,7 +962,7 @@ class FactureRec extends CommonInvoice if ($this->db->query($sql)) { $this->date_when = $date; - if ($increment_nb_gen_done>0) $_facrec->nb_gen_done++; + if ($increment_nb_gen_done>0) $this->nb_gen_done++; return 1; } else diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 8118cbea1ac..0e0bc1d474b 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -1269,7 +1269,7 @@ else // Nb of generation already done print ''.$langs->trans("NbOfGenerationDone").''; print ''; - print $object->nb_gen_done?$object->nb_gen_done:''; + print $object->nb_gen_done?$object->nb_gen_done:'0'; print ''; print ''; @@ -1338,14 +1338,21 @@ else //{ if ($user->rights->facture->creer) { - if (empty($object->frequency) || $object->date_when <= $today) - { - print '
'.$langs->trans("CreateBill").'
'; - } - else - { - print '
'.$langs->trans("CreateBill").'
'; - } + if (! empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) + { + print '
'.$langs->trans("CreateBill").'
'; + } + else + { + if (empty($object->frequency) || $object->date_when <= $today) + { + print '
'.$langs->trans("CreateBill").'
'; + } + else + { + print '
'.$langs->trans("CreateBill").'
'; + } + } } else { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6cc3aa6ffb6..f48b615c3fa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4135,8 +4135,7 @@ function yn($yesno, $case=1, $color=0) /** * Return a path to have a directory according to object. * New usage: $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'modulepart') - * Old usage: '001' with level 3->"0/0/1/", '015' with level 3->"0/1/5/" - * Old usage: 'ABC-1' with level 3 ->"0/0/1/", '015' with level 1->"5/" + * Old usage: '015' with level 3->"0/1/5/", '015' with level 1->"5/", 'ABC-1' with level 3 ->"0/0/1/" * * @param string $num Id of object (deprecated, $object will be used in future) * @param int $level Level of subdirs to return (1, 2 or 3 levels). (deprecated, global option will be used in future) diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 20640733cd4..993570f4790 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -3,9 +3,9 @@ ACCOUNTING_EXPORT_SEPARATORCSV=Column separator for export file ACCOUNTING_EXPORT_DATE=Date format for export file ACCOUNTING_EXPORT_PIECE=Export the number of piece ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Export with global account -ACCOUNTING_EXPORT_LABEL=Export the label -ACCOUNTING_EXPORT_AMOUNT=Export the amount -ACCOUNTING_EXPORT_DEVISE=Export the devise +ACCOUNTING_EXPORT_LABEL=Export label +ACCOUNTING_EXPORT_AMOUNT=Export amount +ACCOUNTING_EXPORT_DEVISE=Export currency Selectformat=Select the format for the file ACCOUNTING_EXPORT_PREFIX_SPEC=Specify the prefix for the file name @@ -183,4 +183,4 @@ Formula=Formula ## Error ErrorNoAccountingCategoryForThisCountry=No accounting category are available for this country -ExportNotSupported=The export format setuped is not supported into this page \ No newline at end of file +ExportNotSupported=The export format setuped is not supported into this page diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index fef4e55ad21..1ee858aa23d 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -142,7 +142,7 @@ Update=Update AddActionToDo=Add event to do AddActionDone=Add event done Close=Close -CloseBox=Remove box from your dashboard +CloseBox=Remove widget from your dashboard Confirm=Confirm ConfirmSendCardByMail=Do you really want to send content of this card by mail to %s ? Delete=Delete @@ -611,7 +611,7 @@ RecordsModified=%s records modified AutomaticCode=Automatic code NotManaged=Not managed FeatureDisabled=Feature disabled -MoveBox=Move box %s +MoveBox=Move widget Offered=Offered NotEnoughPermissions=You don't have permission for this action SessionName=Session name