From b52c441c6493c313d7a17b408e5050d43eff8fd4 Mon Sep 17 00:00:00 2001 From: novalore Date: Sun, 5 Jun 2016 02:26:10 +0200 Subject: [PATCH 1/5] english fix in accountancy for currency --- htdocs/langs/en_US/accountancy.lang | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From ff23c825aec2e6cce5373499a3dfcff95e9eaea7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jun 2016 10:58:23 +0200 Subject: [PATCH 2/5] Code comment --- htdocs/core/lib/functions.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 34e52b3c205..5864cbfa0da 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4128,8 +4128,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) From 9eee61e6b7c1702c97981c4535e446c45aa4ee6a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jun 2016 11:13:19 +0200 Subject: [PATCH 3/5] Fix trans --- htdocs/comm/mailing/cibles.php | 2 +- htdocs/langs/en_US/main.lang | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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/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 From a0458be943b027bf8a41c1f734b748b5391e84d5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jun 2016 11:25:54 +0200 Subject: [PATCH 4/5] Fix object not defined --- htdocs/compta/facture/class/facture-rec.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 9c88eadbe45efbeb7a821425ad1e28825d179918 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jun 2016 11:48:39 +0200 Subject: [PATCH 5/5] Fix: button to generate invoice manually must be disabled if we reach max number of generation. --- htdocs/compta/facture/fiche-rec.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) 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 ''; - } - else - { - print ''; - } + if (! empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) + { + print ''; + } + else + { + if (empty($object->frequency) || $object->date_when <= $today) + { + print ''; + } + else + { + print ''; + } + } } else {