diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index afa67c434e8..085d33f3df0 100755 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -51,18 +51,17 @@ if ($action == 'update') { dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_PROFID1_IN_ADDRESS", $_POST["MAIN_PROFID1_IN_ADDRESS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_PROFID2_IN_ADDRESS", $_POST["MAIN_PROFID2_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"],'chaine',0,'',$conf->entity); -// if ($conf->global->MAIN_FEATURES_LEVEL > 1) -// { - dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'',$conf->entity); -// } + dolibarr_set_const($db, "MAIN_TVAINTRA_NOT_IN_ADDRESS", $_POST["MAIN_TVAINTRA_NOT_IN_ADDRESS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'',$conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; @@ -223,27 +222,31 @@ if ($action == 'edit') // Edit print ''.$langs->trans("HideAnyVATInformationOnPDF").''; print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); print ''; + + // Hide Tva Intra on adress + $var=!$var; + print ''.$langs->trans("ShowVATIntaInAddress").''; + print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); + print ''; -// if ($conf->global->MAIN_FEATURES_LEVEL > 1) -// { - //Desc - $var=!$var; - print ''.$langs->trans("HideDescOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); - print ''; + //Desc + $var=!$var; + print ''.$langs->trans("HideDescOnPDF").''; + print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); + print ''; - //Ref - $var=!$var; - print ''.$langs->trans("HideRefOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); - print ''; + //Ref + $var=!$var; + print ''.$langs->trans("HideRefOnPDF").''; + print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); + print ''; + + //Details + $var=!$var; + print ''.$langs->trans("HideDetailsOnPDF").''; + print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); + print ''; - //Details - $var=!$var; - print ''.$langs->trans("HideDetailsOnPDF").''; - print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); - print ''; -// } print ''; @@ -418,26 +421,30 @@ else // Show print ""; print ''; -// if ($conf->global->MAIN_FEATURES_LEVEL > 1) -// { - //Desc - $var=!$var; - print ''.$langs->trans("HideDescOnPDF").''; - print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC,1); - print ''; + // Hide Tva Intra on adress + $var=!$var; + print ''.$langs->trans("ShowVATIntaInAddress").''; + print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS,1); + print ''; + + //Desc + $var=!$var; + print ''.$langs->trans("HideDescOnPDF").''; + print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC,1); + print ''; - //Ref - $var=!$var; - print ''.$langs->trans("HideRefOnPDF").''; - print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF,1); - print ''; + //Ref + $var=!$var; + print ''.$langs->trans("HideRefOnPDF").''; + print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF,1); + print ''; + + //Details + $var=!$var; + print ''.$langs->trans("HideDetailsOnPDF").''; + print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS,1); + print ''; - //Details - $var=!$var; - print ''.$langs->trans("HideDetailsOnPDF").''; - print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS,1); - print ''; -// } print ''; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 34f1bd5878f..4fc377f896c 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -338,7 +338,10 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target } // Intra VAT - if ($targetcompany->tva_intra) $stringaddress.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcompany->tva_intra); + if (empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS)) + { + if ($targetcompany->tva_intra) $stringaddress.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcompany->tva_intra); + } // Professionnal Ids if (! empty($conf->global->MAIN_PROFID1_IN_ADDRESS) && ! empty($targetcompany->idprof1)) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d569e0a261d..86bebcf2246 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -939,6 +939,7 @@ YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP DownloadMoreSkins=More skins to download SimpleNumRefModelDesc=Returns the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is a sequence without hole and with no reset ShowProfIdInAddress=Show professionnal id with addresses on documents +ShowVATIntaInAddress=Hide VAT Intra num with addresses on documents TranslationUncomplete=Partial translation SomeTranslationAreUncomplete=Some languages may be partially translated or may contains errors. If you detect some, you can fix .lang text files into directory htdocs/langs and submit them on the forum at http://www.dolibarr.org. MenuUseLayout=Make vertical menu hidable (option javascript must not be disabled) diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index fe4aeba479c..fc03d90c35a 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -942,6 +942,7 @@ YourPHPDoesNotHaveSSLSupport=Funciones SSL no disponibles en su PHP DownloadMoreSkins=Más temas para descargar SimpleNumRefModelDesc=Devuelve el número bajo el formato %syymm-nnnn donde yy es el año, mm el mes y nnnn un contador secuencial sin ruptura y sin volver a 0 ShowProfIdInAddress=Mostrar el identificador profesional en las direcciones de los documentos +ShowVATIntaInAddress=Ocultar el IVA identificador en las direcciones de los documentos TranslationUncomplete=Traducción parcial SomeTranslationAreUncomplete=Algunos idiomas están traducidos en parte o pueden contener errores. Si lo encuentra, puede corregir los archivos de texto .lang del directorio htdocs/langs y enviarlos al foro http://www.dolibarr.fr. MenuUseLayout=Hacer el menú izquierdo ocultable (la opción javascript no debería deshabilitarse) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 1dbd9f6df48..f95367d66ac 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -941,6 +941,7 @@ YourPHPDoesNotHaveSSLSupport=Fonctions SSL non présentes dans votre PHP DownloadMoreSkins=+ de thèmes à télécharger SimpleNumRefModelDesc=Renvoie le numéro sous la forme %syymm-nnnn où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0. ShowProfIdInAddress=Afficher l'identifiant professionnel dans les adresses sur les documents +ShowVATIntaInAddress=Cacher l'identifiant TVA Intra dans les adresses sur les documents TranslationUncomplete=Traduction partielle SomeTranslationAreUncomplete=Certaines langues sont traduites partiellement ou peuvent contenir des erreurs. Si vous en détectez, vous pouvez corriger les fichiers textes .lang du répertoire htdocs/langs et les soumettre sur le forum à http://www.dolibarr.fr. MenuUseLayout=Rendre le menu gauche cachable (L'option javascript ne doit pas avoir été désactivée)