From ac7ee86da3bacb5286bd4da751d21788dc30fbb8 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Fri, 2 Oct 2015 13:41:07 +0200 Subject: [PATCH 1/4] fix : Typo --- ChangeLog | 2 +- htdocs/comm/askpricesupplier/card.php | 2 +- htdocs/comm/propal.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/compta/facture.php | 2 +- htdocs/fourn/commande/card.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9bd9ffe3b3..0b6a4a5b871 100644 --- a/ChangeLog +++ b/ChangeLog @@ -351,7 +351,7 @@ For users: Use accesskey on form search. - New: Intervention documents are now available in ECM module. - New: Add attachments on user card + in ECM module. -- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template. +- New: Can add __PROJECT_REF__ and __THIRDPARTY_NAME__ into email topic or content template. - New: [ task #1204 ] add Numering contrat module free (like leopard in product module). - New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice. - New: Enable supplier price log table. diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php index 5b8bd88a920..66f19044cee 100644 --- a/htdocs/comm/askpricesupplier/card.php +++ b/htdocs/comm/askpricesupplier/card.php @@ -1802,7 +1802,7 @@ if ($action == 'create') // Tableau des substitutions $formmail->substit['__ASKREF__'] = $object->ref; $formmail->substit['__SIGNATURE__'] = $user->signature; - $formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__CONTACTCIVNAME__'] = ''; $formmail->substit['__PERSONALIZED__'] = ''; diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e05c5a63dd9..9bf0cce30c1 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2324,7 +2324,7 @@ if ($action == 'create') $formmail->substit['__PROPREF__'] = $object->ref; $formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__REFCLIENT__'] = $object->ref_client; - $formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PERSONALIZED__'] = ''; $formmail->substit['__CONTACTCIVNAME__'] = ''; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index d5f3427b77c..70eab52db53 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2410,7 +2410,7 @@ if ($action == 'create' && $user->rights->commande->creer) $formmail->substit ['__ORDERREF__'] = $object->ref; $formmail->substit ['__SIGNATURE__'] = $user->signature; $formmail->substit ['__REFCLIENT__'] = $object->ref_client; - $formmail->substit ['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit ['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit ['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit ['__PERSONALIZED__'] = ''; $formmail->substit ['__CONTACTCIVNAME__'] = ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e23f1f9414a..c7e6efc1a11 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3840,7 +3840,7 @@ else if ($id > 0 || ! empty($ref)) $formmail->substit['__FACREF__'] = $object->ref; $formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__REFCLIENT__'] = $object->ref_client; - $formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__PROJECT_NAME__'] = (is_object($object->projet)?$object->projet->title:''); $formmail->substit['__PERSONALIZED__'] = ''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 4667200fdfc..d69c86eb1ea 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2333,7 +2333,7 @@ elseif (! empty($object->id)) // Tableau des substitutions $formmail->substit['__ORDERREF__']=$object->ref; $formmail->substit['__ORDERSUPPLIERREF__']=$object->ref_supplier; - $formmail->substit['__THIRPARTY_NAME__'] = $object->thirdparty->name; + $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); $formmail->substit['__SIGNATURE__']=$user->signature; $formmail->substit['__PERSONALIZED__']=''; From 82c7022e20cc918aaa88e1e10beaa923649d8b4b Mon Sep 17 00:00:00 2001 From: philippe grand Date: Sat, 3 Oct 2015 14:47:11 +0200 Subject: [PATCH 2/4] Fix : internationalization --- htdocs/admin/propal.php | 10 +++++----- .../propale/doc/doc_generic_proposal_odt.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 1294888ceb1..b9242bd0c4e 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -129,11 +129,11 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK') } } -if ($action == 'set_PROPALE_FREE_TEXT') +if ($action == 'set_PROPOSAL_FREE_TEXT') { - $freetext = GETPOST('PROPALE_FREE_TEXT'); // No alpha here, we want exact string + $freetext = GETPOST('PROPOSAL_FREE_TEXT'); // No alpha here, we want exact string - $res = dolibarr_set_const($db, "PROPALE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -575,10 +575,10 @@ print ''; $var=! $var; print '
'; print ''; -print ''; +print ''; print ''; print $langs->trans("FreeLegalTextOnProposal").' ('.$langs->trans("AddCRIfTooLong").')
'; -$variablename='PROPALE_FREE_TEXT'; +$variablename='PROPOSAL_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 8f79094befc..80ec0ba6fe0 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -324,7 +324,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales // Line of free text $newfreetext=''; - $paramfreetext='PROPALE_FREE_TEXT'; + $paramfreetext='PROPOSAL_FREE_TEXT'; if (! empty($conf->global->$paramfreetext)) { $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 7fb02fe0514..21820e42a66 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1541,7 +1541,7 @@ class pdf_azur extends ModelePDFPropales function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) { $showdetails=0; - return pdf_pagefoot($pdf,$outputlangs,'PROPALE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); + return pdf_pagefoot($pdf,$outputlangs,'PROPOSAL_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); } /** From b6de2a954cdacb3d99129fd5c5a70e5007ba64c3 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Sat, 3 Oct 2015 15:04:03 +0200 Subject: [PATCH 3/4] fix : internationalization --- htdocs/admin/commande.php | 10 +++++----- .../commande/doc/doc_generic_order_odt.modules.php | 2 +- .../core/modules/commande/doc/pdf_einstein.modules.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index c83247a9bbf..b2d44047d77 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -204,11 +204,11 @@ else if ($action == 'set_COMMANDE_DRAFT_WATERMARK') } } -else if ($action == 'set_COMMANDE_FREE_TEXT') +else if ($action == 'set_ORDER_FREE_TEXT') { - $freetext = GETPOST("COMMANDE_FREE_TEXT"); // No alpha here, we want exact string + $freetext = GETPOST("ORDER_FREE_TEXT"); // No alpha here, we want exact string - $res = dolibarr_set_const($db, "COMMANDE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, "ORDER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -552,10 +552,10 @@ $var=true; $var=! $var; print ''; print ''; -print ''; +print ''; print ''; print $langs->trans("FreeLegalTextOnOrders").' ('.$langs->trans("AddCRIfTooLong").')
'; -$variablename='COMMANDE_FREE_TEXT'; +$variablename='ORDER_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 1b7da875073..61aba27a6b8 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -290,7 +290,7 @@ class doc_generic_order_odt extends ModelePDFCommandes // Line of free text $newfreetext=''; - $paramfreetext='COMMANDE_FREE_TEXT'; + $paramfreetext='ORDER_FREE_TEXT'; if (! empty($conf->global->$paramfreetext)) { $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray); diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 0716519457c..d9fe45831cf 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1350,7 +1350,7 @@ class pdf_einstein extends ModelePDFCommandes function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) { $showdetails=0; - return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); + return pdf_pagefoot($pdf,$outputlangs,'ORDER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); } } From 298fafd7d2f59cb53c8665c7ab59175ce87a8622 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Sat, 3 Oct 2015 15:10:53 +0200 Subject: [PATCH 4/4] fix : internationalization --- htdocs/admin/facture.php | 10 +++++----- .../facture/doc/doc_generic_invoice_odt.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index b77df2a7f12..07b00e5133f 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -226,11 +226,11 @@ if ($action == 'set_FACTURE_DRAFT_WATERMARK') } } -if ($action == 'set_FACTURE_FREE_TEXT') +if ($action == 'set_INVOICE_FREE_TEXT') { - $freetext = GETPOST('FACTURE_FREE_TEXT'); // No alpha here, we want exact string + $freetext = GETPOST('INVOICE_FREE_TEXT'); // No alpha here, we want exact string - $res = dolibarr_set_const($db, "FACTURE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, "INVOICE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -753,10 +753,10 @@ print ''; $var=! $var; print '
'; print ''; -print ''; +print ''; print ''; print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')
'; -$variablename='FACTURE_FREE_TEXT'; +$variablename='INVOICE_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 2ca90b13ace..12ea7aa7b08 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -298,7 +298,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures // Line of free text $newfreetext=''; - $paramfreetext='FACTURE_FREE_TEXT'; + $paramfreetext='INVOICE_FREE_TEXT'; if (! empty($conf->global->$paramfreetext)) { $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index ecedfd2092a..a0514c001e9 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1637,7 +1637,7 @@ class pdf_crabe extends ModelePDFFactures function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0) { $showdetails=0; - return pdf_pagefoot($pdf,$outputlangs,'FACTURE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); + return pdf_pagefoot($pdf,$outputlangs,'INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); } }