diff --git a/.tx/config b/.tx/config index c20f75769ae..d6e339462e3 100644 --- a/.tx/config +++ b/.tx/config @@ -260,6 +260,12 @@ source_file = htdocs/langs/en_US/propal.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.resource] +file_filter = htdocs/langs//resource.lang +source_file = htdocs/langs/en_US/resource.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.salaries] file_filter = htdocs/langs//salaries.lang source_file = htdocs/langs/en_US/salaries.lang diff --git a/ChangeLog b/ChangeLog index 22b1631390f..ed4498c342a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -162,7 +162,8 @@ Dolibarr better: creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead. - A lot of pages called fiche.php were renamed into card.php - A lot of pages called liste.php were renamed into list.php - +- If you used warehouse/stock module, recheck setup of stock increase/decrease rules of the + warehouse module and your Point Of Sale module if you use one. ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** @@ -174,7 +175,10 @@ Dolibarr better: - Fix: Civility & birthdate wasn't save into adherent module. - Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref - Fix: Chars - is no more allowed into value for code for extra fields. -( Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache +- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache +- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state +- Fix: Show sender Country on PDF docs when sender Country <> receiver Country +- Fix: [ bug #1624 ] Use lowest buying price for margin when selling with POS ***** ChangeLog for 3.6.1 compared to 3.6.* ***** For users: diff --git a/build/doxygen/doxygen_footer.html b/build/doxygen/doxygen_footer.html index 1f4cbd00215..e11df270ddc 100755 --- a/build/doxygen/doxygen_footer.html +++ b/build/doxygen/doxygen_footer.html @@ -26,7 +26,7 @@ for $projectname by Doxygen $doxygenversio -
+
-
+
diff --git a/build/doxygen/doxygen_header.html b/build/doxygen/doxygen_header.html index 363d408d43c..0c2e189136b 100755 --- a/build/doxygen/doxygen_header.html +++ b/build/doxygen/doxygen_header.html @@ -24,7 +24,7 @@ File added into doxygen generated documentation
-
+
@@ -54,7 +54,7 @@ File added into doxygen generated documentation
$projectname
- $projectnumber
-
+
diff --git a/dev/detectduplicatelangkey.sh b/dev/detectduplicatelangkey.sh deleted file mode 100755 index 06d9cd8a69e..00000000000 --- a/dev/detectduplicatelangkey.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Helps find duplicate translation keys in language files -# -# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr - -for file in `find . -type f` -do - dupes=$( - sed "s/^\s*//" "$file" | # Remove any leading whitespace - sed "s/\s*\=/=/" | # Remove any whitespace before = - grep -Po "(^.*?)=" | # Non greedeely match everything before = - sed "s/\=//" | # Remove trailing = so we get the key - sort | uniq -d # Find duplicates - ) - - if [ -n "$dupes" ] - then - echo "Duplicates found in $file" - echo "$dupes" - fi -done diff --git a/dev/fixnotabfiles.sh b/dev/detectnotabfiles.sh similarity index 91% rename from dev/fixnotabfiles.sh rename to dev/detectnotabfiles.sh index 3e5d28966c9..c89b999b03d 100755 --- a/dev/fixnotabfiles.sh +++ b/dev/detectnotabfiles.sh @@ -1,6 +1,6 @@ #!/bin/sh #------------------------------------------------------ -# Script to find files that are not Unix encoded +# Detect files that does not contains any tab inside # # Laurent Destailleur - eldy@users.sourceforge.net #------------------------------------------------------ diff --git a/dev/fixduplicatelangkey.sh b/dev/fixduplicatelangkey.sh new file mode 100755 index 00000000000..2d9cb7f7a85 --- /dev/null +++ b/dev/fixduplicatelangkey.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Helps find duplicate translation keys in language files +# +# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr + + +# Syntax +if [ "x$1" != "xlist" -a "x$1" != "xfix" ] +then + echo "Usage: detectduplicatelangkey.sh (list|fix)" +fi + + +if [ "x$1" = "xlist" ] +then + for file in `find htdocs/langs/en_US -name *.lang -type f` + do + dupes=$( + sed "s/^\s*//" "$file" | # Remove any leading whitespace + sed "s/\s*\=/=/" | # Remove any whitespace before = + grep -Po "(^.*?)=" | # Non greedeely match everything before = + sed "s/\=//" | # Remove trailing = so we get the key + sort | uniq -d # Find duplicates + ) + + if [ -n "$dupes" ] + then + echo "Duplicates found in $file" + echo "$dupes" + fi + done +fi + +# To convert +if [ "x$1" = "xfix" ] +then + echo Feature not implemented. Please fix files manually. +fi diff --git a/dev/optimize_images.sh b/dev/optimize_images.sh index 616eec75757..0d532d054ad 100755 --- a/dev/optimize_images.sh +++ b/dev/optimize_images.sh @@ -10,6 +10,7 @@ INPLACE='0' max_input_size=0 max_output_size=0 + usage() { cat </dev/null rm -fr $2.firstpass fi @@ -67,6 +69,25 @@ get_max_file_length() main() { + test=`type pngcrush >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool pngcrush not found" && exit + fi + + test=`type optipng >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool optipng not found" && exit + fi + + test=`type jpegtran >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool jpegtran not found" && exit + fi + + # If $INPUT is empty, then we use current directory if [[ "$INPUT" == "" ]]; then INPUT=$(pwd) @@ -81,6 +102,8 @@ main() OUTPUT='/tmp/optimize' fi + echo "Mode is $INPLACE (1=Images are replaced, 0=New images are stored into $OUTPUT)" + # We create the output directory mkdir -p $OUTPUT @@ -96,6 +119,7 @@ main() # Search of all jpg/jpeg/png in $INPUT # We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT + echo "Scan $INPUT to find images" IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT) if [ "$QUIET" == "0" ]; then @@ -103,6 +127,7 @@ main() echo fi for CURRENT_IMAGE in $IMAGES; do + echo "Process $CURRENT_IMAGE" filename=$(basename $CURRENT_IMAGE) if [ "$QUIET" == "0" ]; then printf '%s ' "$filename" @@ -155,6 +180,13 @@ SHORTOPTS="h,i:,o:,q,s,p" LONGOPTS="help,input:,output:,quiet,no-stats,inplace" ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@") +# Syntax +if [ "x$1" != "xlist" -a "x$1" != "xfix" ] +then + echo "Usage: optimize_images.sh (list|fix) -i dirtoscan" + exit +fi + eval set -- "$ARGS" while true; do case $1 in @@ -191,5 +223,11 @@ while true; do shift done +# To convert +if [ "x$1" = "xlist" ] +then + INPLACE=0 +fi + main diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index deaecd95526..ac329318ae5 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -282,7 +282,7 @@ if ($action == 'create') print '
'; - print '
 
'; + print '
 
'; print ''; @@ -304,7 +304,7 @@ if (($id || $ref) && $action == 'edit') print '
'; - print '
'; + print '
'; print ''; diff --git a/dev/test/testdiv.php b/dev/test/testdiv.php index 8700be5b2ab..2f1bd9182ae 100644 --- a/dev/test/testdiv.php +++ b/dev/test/testdiv.php @@ -19,14 +19,14 @@ -
+
diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index 4ee52ce0da6..ce38bb7d7e8 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -72,7 +72,7 @@ print $langs->trans("CashDeskThirdParty").': '.$companyLink.'
'; /*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'
'; print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'
'; print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'
';*/ -if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)) +if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) { print $langs->trans("CashDeskWarehouse").': '.$warehouseLink; } diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 15762ecf494..1aa1c0c4723 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -17,6 +17,7 @@ */ $langs->load("main"); +$langs->load("bills"); // Object $form must de defined @@ -111,8 +112,9 @@ $langs->load("main");

trans("Notes"); ?>

- " /> -

trans("RestartSelling"); ?>

+ diff --git a/htdocs/cashdesk/tpl/validation2.tpl.php b/htdocs/cashdesk/tpl/validation2.tpl.php index 9ebab951eb9..b00268d7b0a 100644 --- a/htdocs/cashdesk/tpl/validation2.tpl.php +++ b/htdocs/cashdesk/tpl/validation2.tpl.php @@ -18,10 +18,11 @@ */ $langs->load("main"); +$langs->load("bills"); ?> -

trans("SellFinished"); ?>

+

trans("SellFinished"); ?>


diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index 173c1894555..27ce3380dd4 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -218,7 +218,33 @@ switch ($action) $resultcreate=$invoice->create($user,0,dol_stringtotime($obj_facturation->paiementLe())); if ($resultcreate > 0) { - $resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), (isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0)); + $warehouseidtodecrease=(isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0); + if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $warehouseidtodecrease=0; // If a particular stock is defined, we disable choice + + $resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), 0); + + if ($warehouseidtodecrease > 0) + { + // Decrease + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); + // Loop on each line + $cpt=count($invoice->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($invoice->lines[$i]->fk_product > 0) + { + $mouvP = new MouvementStock($db); + $mouvP->origin = &$invoice; + // We decrease stock for product + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($result < 0) { + $error++; + } + } + } + } } else { @@ -232,7 +258,33 @@ switch ($action) $resultcreate=$invoice->create($user,0,0); if ($resultcreate > 0) { - $resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), (isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0)); + $warehouseidtodecrease=(isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0); + if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $warehouseidtodecrease=0; // If a particular stock is defined, we disable choice + + $resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), 0); + + if ($warehouseidtodecrease > 0) + { + // Decrease + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); + // Loop on each line + $cpt=count($invoice->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($invoice->lines[$i]->fk_product > 0) + { + $mouvP = new MouvementStock($db); + $mouvP->origin = &$invoice; + // We decrease stock for product + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($result < 0) { + $error++; + } + } + } + } $id = $invoice->id; diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 672c92b9508..98eaa053635 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -256,11 +256,11 @@ if ($user->rights->categorie->creer) print ''; - print '

'; + print '
'; print ''; - print '     '; + print '     '; print ''; - print '
'; + print '
'; print ''; } diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index aa82fdb455d..245509578d0 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -163,8 +163,7 @@ if (empty($reshook) && ! empty($extrafields->attribute_label)) print ''; print '
'; -print '
'; -print '
'; +print '
'; print ''; diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 0c154a0b72f..98d4fb2b930 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -190,9 +190,11 @@ if ($action == 'edit') } } - print '
'; - print '     '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; @@ -266,9 +268,11 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print ''; - print '
'; - print '     '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 1cb3bc741bc..12793a61fa1 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -779,11 +779,11 @@ if ($action == 'create') print ''; - print '

'; + print '
'; print ''; - print '     '; + print '     '; print ''; - print '
'; + print '
'; print ""; } @@ -1013,9 +1013,11 @@ if ($id > 0) dol_fiche_end(); - print '
'; - print '     '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } @@ -1246,34 +1248,6 @@ if ($id > 0) if ($action != 'edit') { - - if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) { - print '
'; - print ''; // ancre - - /* - * Documents generes - */ - - $filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id; - $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id; - - $genallowed=$user->rights->agenda->myactions->create; - $delallowed=$user->rights->agenda->myactions->delete; - - $var=true; - - $somethingshown=$formfile->show_documents('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang); - - print '
'; - - - print '
'; - - print '
 
'; - } - - // Link to agenda views print '
'; print '
'; @@ -1313,6 +1287,33 @@ if ($id > 0) print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone"').' '; print '
'."\n"; print '
'; + + if (empty($conf->global->AGENDA_DISABLE_BUILDDOC)) + { + print '
 
'; + print ''; // ancre + + /* + * Documents generes + */ + + $filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id; + $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id; + + $genallowed=$user->rights->agenda->myactions->create; + $delallowed=$user->rights->agenda->myactions->delete; + + $var=true; + + $somethingshown=$formfile->show_documents('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang); + + print '
'; + + + print '
'; + + print '
 
'; + } } } diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 0ffcb351500..963847aee18 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -281,14 +281,14 @@ if ($action == 'create') print ''."\n"; - print '
'; + print '
'; print ''; if (! empty($backtopage)) { - print '     '; + print '     '; print ''; } - print '
'."\n"; + print ''."\n"; print ''."\n"; @@ -381,11 +381,11 @@ elseif ($action == 'edit') print '
'; - print '
'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; print ''; } diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 678ea8f622d..ca4c27bfdbc 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -94,6 +94,13 @@ $object->substitutionarrayfortest=array( //,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet ); +// List of sending methods +$listofmethods=array(); +$listofmethods['mail']='PHP mail function'; +//$listofmethods['simplemail']='Simplemail class'; +$listofmethods['smtps']='SMTP/SMTPS socket library'; + + /* * Actions @@ -701,7 +708,7 @@ if ($action == 'create') print ''; print ''; - print '
'; + print '
'; print ''; } @@ -741,10 +748,21 @@ else { // Define message to recommand from command line - // Pour des raisons de securite, on ne permet pas cette fonction via l'IHM, - // on affiche donc juste un message + $sendingmode=$conf->global->MAIN_MAIL_SENDMODE; + if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function - if (empty($conf->global->MAILING_LIMIT_SENDBYWEB)) + if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail') + { + // EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent. + // You ensure that every user is using its own SMTP server. + $linktoadminemailbefore=''; + $linktoadminemailend=''; + setEventMessage($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), 'warnings'); + setEventMessage($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), 'warnings'); + if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessage($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), 'warnings'); + $_GET["action"]=''; + } + else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB)) { // Pour des raisons de securite, on ne permet pas cette fonction via l'IHM, // on affiche donc juste un message @@ -764,7 +782,7 @@ else } $text.=$langs->trans('ConfirmSendingEmailing').'
'; $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); } } @@ -1139,11 +1157,11 @@ else print ''; - print '
'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; print ''; print '
'; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 49d2f1befa2..75f2399017b 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -276,7 +276,8 @@ if ($object->fetch($id) >= 0) $obj = new $classname($db); - $qualified=1; + // Check dependencies + $qualified=(isset($obj->enabled)?$obj->enabled:1); foreach ($obj->require_module as $key) { if (! $conf->$key->enabled || (! $user->admin && $obj->require_admin)) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6d23d3a982d..465fe5e2d76 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1310,9 +1310,11 @@ if ($action == 'create') print ''; // Bank Account - print '' . $langs->trans('BankAccount') . ''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print ''; + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->module->banque->enabled) { + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + } // What trigger creation print '' . $langs->trans('Source') . ''; @@ -1514,10 +1516,11 @@ if ($action == 'create') $langs->load("bills"); - print '
'; + print '
'; print ''; - print ' '; - print '
'; + print '     '; + print ''; + print ''; print ""; @@ -1892,7 +1895,7 @@ if ($action == 'create') print ''; } - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL)) + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled) { // Bank Account print ''; diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index e575c8f27fc..87281e7ea63 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -3,7 +3,8 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2014 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,14 +23,13 @@ /** * \file htdocs/comm/propal/apercu.php * \ingroup propal - * \brief Page de l'onglet apercu d'une propal + * \brief Preview tab of propal */ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $langs->load('propal'); $langs->load("bills"); @@ -44,18 +44,11 @@ $result = restrictedArea($user, 'propal', $id); /* - * View + * View Mode */ llxHeader(); -$form = new Form($db); - -/* *************************************************************************** */ -/* */ -/* Mode fiche */ -/* */ -/* *************************************************************************** */ if ($id > 0 || ! empty($ref)) { @@ -73,29 +66,30 @@ if ($id > 0 || ! empty($ref)) /* * Propal */ - print ''; + print '
'; - // Ref - print ''; + // Ref + print ''; + print ''; + print ''; - // Ref client - print ''; - print ''; + // Ref client + print ''; + print ''; + print ''; - $rowspan=2; - // Tiers - print ''; - print ''; + // Thirdparty + print ''; + print ''; + print ''; - // Ligne info remises tiers + // Status + print ''; + print ''; + print ''; + + // Discount print ''; + print '.'; + print ''; - // ligne - // partie Gauche - print ''; + // Date + print ''; + print ''; - // partie Droite sur $rowspan lignes - print ''; + print ''; + print ''; + + // Total VAT - left part + print ''; + print ''; + print ''; + + // Total TTC - left part + print ''; + print ''; + print ''; + + print '
'.$langs->trans('Ref').''.$object->ref.'
'.$langs->trans('Ref').''.$object->ref.'
'; - print ''; - print '
'; - print $langs->trans('RefCustomer').''; - print '
'; - print '
'; - print $object->ref_client; - print '
'.$langs->trans('RefCustomer').''.$object->ref_client.'
'.$langs->trans('Company').''.$soc->getNomUrl(1).'
'.$langs->trans('Company').''.$soc->getNomUrl(1).'
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans('Discounts').''; if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent); else print $langs->trans("CompanyHasNoRelativeDiscount"); @@ -103,44 +97,43 @@ if ($id > 0 || ! empty($ref)) print '. '; if ($absolute_discount) print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->trans("Currency".$conf->currency)); else print $langs->trans("CompanyHasNoAbsoluteDiscount"); - print '.'; - print '
'.$langs->trans('Date').''; - print dol_print_date($object->date,'daytext'); - print '
'.$langs->trans('Date').''.dol_print_date($object->date,'daytext').''; + // Right part with $rowspan lines + $rowspan=4; + print ''; - /* - * Documents - */ - $objectref = dol_sanitizeFileName($object->ref); - $dir_output = $conf->propal->dir_output . "/"; - $filepath = $dir_output . $objectref . "/"; - $file = $filepath . $objectref . ".pdf"; - $filedetail = $filepath . $objectref . "-detail.pdf"; + /* + * Documents + */ + $objectref = dol_sanitizeFileName($object->ref); + $dir_output = $conf->propal->dir_output . "/"; + $filepath = $dir_output . $objectref . "/"; + $file = $filepath . $objectref . ".pdf"; + $filedetail = $filepath . $objectref . "-detail.pdf"; $relativepath = $objectref.'/'.$objectref.'.pdf'; $relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf'; // Define path to preview pdf file (preview precompiled "file.ext" are "file.ext_preview.png") - $fileimage = $file.'_preview.png'; // If PDF has 1 page + $fileimage = $file.'_preview.png'; // If PDF has 1 page $fileimagebis = $file.'_preview-0.pdf.png'; // If PDF has more than one page $relativepathimage = $relativepath.'_preview.png'; - $var=true; + $var=true; // Si fichier PDF existe if (file_exists($file)) { $encfile = urlencode($file); - print_titre($langs->trans("Documents")); - print ''; + print '
'; + print ''; - print ""; + print ''; print ''; @@ -166,13 +159,25 @@ if ($id > 0 || ! empty($ref)) } } - print ""; - print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print '
'.$langs->trans("Documents").'
".$langs->trans("Propal")." PDF
'.$langs->trans("Proposal").' PDF'.$object->ref.'.pdf
'.$langs->trans('AmountHT').''.price($object->price).''.$langs->trans("Currency".$conf->currency).'
'; + // Total HT - left part + print '
'.$langs->trans('AmountHT').'' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans('AmountVAT').'' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans('AmountTTC').'' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '
'; dol_fiche_end(); } @@ -183,10 +188,13 @@ if ($id > 0 || ! empty($ref)) } } +print ''; +print ''; +print '
'; +print '
'; // Si fichier png PDF d'1 page trouve if (file_exists($fileimage)) { - print ''; + print ''; } // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis)) @@ -199,10 +207,13 @@ elseif (file_exists($fileimagebis)) if (file_exists($dir_output.$preview)) { - print '

'; + print '

'; } } } +print '

'; +print '
'; llxFooter(); diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 12dbbe7d1c1..fb9d5257d49 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -416,7 +416,15 @@ class Propal extends CommonObject // infos marge - $this->line->fk_fournprice = $fk_fournprice; + if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { + // by external module, take lowest buying price + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($this->db); + $productFournisseur->find_min_price_product_fournisseur($fk_product); + $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; + } else { + $this->line->fk_fournprice = $fk_fournprice; + } $this->line->pa_ht = $pa_ht; // Mise en option de la ligne @@ -567,7 +575,15 @@ class Propal extends CommonObject $this->line->skip_update_total = $skip_update_total; // infos marge - $this->line->fk_fournprice = $fk_fournprice; + if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { + // by external module, take lowest buying price + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($this->db); + $productFournisseur->find_min_price_product_fournisseur($fk_product); + $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; + } else { + $this->line->fk_fournprice = $fk_fournprice; + } $this->line->pa_ht = $pa_ht; $this->line->date_start=$date_start; diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index fe3e39d266d..b2d92dd55dc 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -136,14 +136,14 @@ if ($socid > 0) print ""; - print '
'; + print '
'; print ''; if (! empty($backtopage)) { - print '    '; + print '     '; print ''; } - print '
'; + print ''; print ""; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 79f952fe7fd..b0475871458 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -278,14 +278,14 @@ if ($socid > 0) print ""; - print '
'; + print '
'; print ''; if (! empty($backtopage)) { - print '    '; + print '     '; print ''; } - print '
'; + print ''; print ''; diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 839ca73d5b9..e6878eef179 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -3,7 +3,8 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2014 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,21 +23,17 @@ /** * \file htdocs/commande/apercu.php * \ingroup commande - * \brief Page de l'onglet apercu d'une commande + * \brief Preview tab of order */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; -if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $langs->load('orders'); -$langs->load('propal'); $langs->load("bills"); $langs->load('compta'); -$langs->load('sendings'); // Security check $socid=0; @@ -47,19 +44,11 @@ $result=restrictedArea($user,'commande',$id,''); /* - * View + * View Mode */ llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); -$form = new Form($db); - -/* *************************************************************************** */ -/* */ -/* Mode fiche */ -/* */ -/* *************************************************************************** */ - if ($id > 0 || ! empty($ref)) { $object = new Commande($db); @@ -70,40 +59,46 @@ if ($id > 0 || ! empty($ref)) $soc->fetch($object->socid); - $head = commande_prepare_head($object); + $head = commande_prepare_head($object); dol_fiche_head($head, 'preview', $langs->trans("CustomerOrder"), 0, 'order'); - print ''; + print '
'; // Ref - print '"; - print ''; - print '"; + print '"; + print ''; // Ref cde client - print ''; - print ''; - $nbrow=6; - print ''; + print ''; + print ''; - /* - * Documents - */ + // Client + print ''; + print ''; + print ''; + + // Statut + print ''; + print ''; + print ''; + + // Discount - left part + print ''; + print ''; + print ''; + + // Date - left part + print ''; + print ''; + + // Right part with $rowspan lines + $rowspan=4; + print '
'.$langs->trans("Ref")."'.$object->ref.''.$langs->trans("Source").' : '.$object->getLabelSource(); - if ($object->source == 0) - { - // Propale - $propal = new Propal($db); - $propal->fetch($object->propale_id); - print ' -> '.$propal->ref.''; - } - print "
'.$langs->trans("Ref")."'.$object->ref.'
'; - print ''; - print '
'; - print $langs->trans('RefCustomer').''; - print '
'; - print '
'; - print $object->ref_client; - print ''; + print '
'.$langs->trans('RefCustomer').''.$object->ref_client.'
'.$langs->trans("Customer").''.$soc->getNomUrl(1).'
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans('Discounts').''.$object->remise_percent.'%
'.$langs->trans("Date").''.dol_print_date($object->date,"daytext").''; + + /* + * Documents + */ $objectref = dol_sanitizeFileName($object->ref); $dir_output = $conf->commande->dir_output . "/"; $filepath = $dir_output . $objectref . "/"; @@ -119,16 +114,16 @@ if ($id > 0 || ! empty($ref)) $var=true; - // Si fichier PDF existe + // if PDF file exist if (file_exists($file)) { $encfile = urlencode($file); - print_titre($langs->trans("Documents")); - print ''; + print '
'; + print ''; print ""; - print ''; + print ''; print ''; print ''; print ''; @@ -139,7 +134,7 @@ if ($id > 0 || ! empty($ref)) { print ""; - print ''; + print ''; print ''; print ''; print ''; @@ -162,37 +157,24 @@ if ($id > 0 || ! empty($ref)) } } - print ""; + print ''; - // Client - print ""; - print ''; + // Total HT - left part + print ''; + print ''; print ''; - // Statut - print ''; - print "\n"; + // Total VAT - left part + print ''; + print ''; print ''; - // Date - print ''; - print "\n"; - print ''; + // Total TTC - left part + print ''; + print ''; + print ''; - // ligne 6 - // partie Gauche - print ''; - print ''; - print ''; - - // ligne 7 - // partie Gauche - print ''; - print ''; - print ''; - print '
'.$langs->trans("Documents").'
".$langs->trans("Order")." PDF'.$object->ref.'.pdf'.$object->ref.'.pdf'.dol_print_size(dol_filesize($file)).''.dol_print_date(dol_filemtime($file),'dayhour').'
Commande detaillee'.$object->ref.'-detail.pdf'.$object->ref.'-detail.pdf'.dol_print_size(dol_filesize($filedetail)).''.dol_print_date(dol_filemtime($filedetail),'dayhour').'
".$langs->trans("Customer")."'; - print ''.$soc->getNomUrl(1).''; - print '
'.$langs->trans('AmountHT').'' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans("Status").'".$object->getLibStatut(4)."
'.$langs->trans('AmountVAT').'' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans("Date").'".dol_print_date($object->date,"daytext")."
'.$langs->trans('AmountTTC').'' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans('GlobalDiscount').''.$object->remise_percent.'%
'.$langs->trans('AmountHT').''.price($object->total_ht).''.$langs->trans("Currency".$conf->currency).'
'; + print '
'; dol_fiche_end(); } @@ -203,10 +185,13 @@ if ($id > 0 || ! empty($ref)) } } +print ''; +print ''; +print '
'; +print '
'; // Si fichier png PDF d'1 page trouve if (file_exists($fileimage)) { - print ''; + print ''; } // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis)) @@ -219,10 +204,13 @@ elseif (file_exists($fileimagebis)) if (file_exists($dir_output.$preview)) { - print '

'; + print '

'; } } } +print '

'; +print '
'; llxFooter(); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 4bf1eceb6dc..115b3248a05 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1391,10 +1391,13 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; // Bank Account - print '' . $langs->trans('BankAccount') . ''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print ''; - + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) + { + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + } + // Delivery delay print '' . $langs->trans('AvailabilityPeriod') . ''; $form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1); @@ -1530,7 +1533,7 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; // Button "Create Draft" - print '
'; + print '
'; print ''; @@ -1995,22 +1998,25 @@ if ($action == 'create' && $user->rights->commande->creer) { $rowspan ++; // Bank Account - print ''; - print ''; - print '
'; - print $langs->trans('BankAccount'); - print ''; - if ($action != 'editbankaccount' && $user->rights->commande->creer) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; - print ''; - if ($action == 'editbankaccount') { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } else { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); - } - print ''; - print ''; - + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) + { + print ''; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if ($action != 'editbankaccount' && $user->rights->commande->creer) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; + print ''; + if ($action == 'editbankaccount') { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ''; + print ''; + } + // Total HT print '' . $langs->trans('AmountHT') . ''; print '' . price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency) . ''; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index ed308394e6c..49ba2536bfa 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1224,7 +1224,15 @@ class Commande extends CommonOrder $this->line->date_end=$date_end; // infos marge - $this->line->fk_fournprice = $fk_fournprice; + if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { + // by external module, take lowest buying price + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($this->db); + $productFournisseur->find_min_price_product_fournisseur($fk_product); + $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; + } else { + $this->line->fk_fournprice = $fk_fournprice; + } $this->line->pa_ht = $pa_ht; // TODO Ne plus utiliser @@ -2421,7 +2429,15 @@ class Commande extends CommonOrder $this->line->skip_update_total=$skip_update_total; // infos marge - $this->line->fk_fournprice = $fk_fournprice; + if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { + //by external module, take lowest buying price + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($this->db); + $productFournisseur->find_min_price_product_fournisseur($fk_product); + $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; + } else { + $this->line->fk_fournprice = $fk_fournprice; + } $this->line->pa_ht = $pa_ht; // TODO deprecated diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 1009b030210..99458e3aea0 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -496,7 +496,7 @@ if ($action == 'create' && !$error) } // Button "Create Draft" - print '
'; + print '
'; print "\n"; print ''; @@ -683,7 +683,7 @@ if (($action != 'create' && $action != 'add') || !$error) /* * Boutons actions */ - print '

'.$langs->trans("CloseProcessedOrdersAutomatically"); + print '
'.$langs->trans("CloseProcessedOrdersAutomatically"); print '
'; print ''; print ''; @@ -691,6 +691,7 @@ if (($action != 'create' && $action != 'add') || !$error) //print ''.$langs->trans("GoBack").''; print ''; print '
'; + print '
'; print ''; $db->free($resql); } diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 30cf5b9c5ac..e5bafe8fed6 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -496,11 +496,11 @@ else unset($tblyear[1]); unset($tblyear[2]); - print '
'; + print '
'; print $show1; - print '
'; + print '
'; print $show2; - print '
'; + print ''; print '
'; } diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index b1852785466..fd1f3f9ee8e 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -354,7 +354,7 @@ if ($action == 'create') print ''; - print '

'; + print '
'; print ''; } @@ -647,8 +647,11 @@ else print ''; - print '

'; - print '  
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 978fc2b3838..4343e2cb921 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -220,7 +220,7 @@ class Account extends CommonObject /** * Add an entry into table ".MAIN_DB_PREFIX."bank * - * @param timsestmap $date Date operation + * @param timestamp $date Date operation * @param string $oper 1,2,3,4... (deprecated) or TYP,VIR,PRE,LIQ,VAD,CB,CHQ... * @param string $label Descripton * @param float $amount Amount diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index 601db34c964..0672104ff60 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -182,7 +182,7 @@ print '"; -print '
'; +print '
'; print ""; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 20433118bbf..bcef3512c33 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -303,8 +303,11 @@ if ($action == 'create') print ''; - print '
    '; - print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } @@ -396,9 +399,11 @@ else if ($id) print ''; - print '
  '; + print '
'; + print ''; + print '     '; print ''; - print '
'; + print ''; print ''; diff --git a/htdocs/compta/dons/card.php b/htdocs/compta/dons/card.php index e453ef623c3..c365aa0928a 100644 --- a/htdocs/compta/dons/card.php +++ b/htdocs/compta/dons/card.php @@ -76,7 +76,7 @@ if ($action == 'update') if (empty($amount)) { - $setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Amount")), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Amount")), 'errors'); $action = "create"; $error++; } @@ -329,7 +329,7 @@ if ($action == 'create') $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$don,$action); // Note that $action and $object may have been modified by hook print "\n"; - print '
   
'; + print '
   
'; print "\n"; } @@ -429,7 +429,7 @@ if (! empty($id) && $action == 'edit') print "\n"; - print '
   
'; + print '
   
'; print "\n"; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 9d003ae0aa7..56b8cbd5e5f 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2275,10 +2275,11 @@ if ($action == 'create') print "\n"; // Button "Create Draft" - print '
'; + print '
'; print ''; - print ' '; - print '
'; + print '     '; + print ''; + print ''; print "\n"; @@ -3486,7 +3487,7 @@ if ($action == 'create') $i ++; } print ''; - print '
 
'; + print '
 
'; print ''; $db->free($resqlorderlist); } else { diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 211d9241a8f..8f03e33bb03 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -3,7 +3,8 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2014 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,9 +22,9 @@ */ /** - * \file htdocs/compta/facture/apercu.php - * \ingroup facture - * \brief Page de l'onglet apercu d'une facture + * \file htdocs/compta/facture/apercu.php + * \ingroup facture + * \brief Preview Tab of invoice */ require '../../main.inc.php'; @@ -67,12 +68,6 @@ if ($id > 0 || ! empty($ref)) $soc = new Societe($db); $soc->fetch($object->socid); - $author = new User($db); - if ($object->user_author) - { - $author->fetch($object->user_author); - } - $head = facture_prepare_head($object); dol_fiche_head($head, 'preview', $langs->trans("InvoiceCustomer"), 0, 'bill'); @@ -80,32 +75,28 @@ if ($id > 0 || ! empty($ref)) $totalpaye = $object->getSommePaiement(); /* - * Facture + * Invoice */ print ''; - $rowspan=3; // Ref - print ''; + print ''; + print ''; + print ''; // Ref customer - print ''; - print ''; + print ''; + print ''; + print ''; - // Societe + // Thirdparty print ''; print ''; print ''; // Type - print ''; + print ''; + print ''; + print ''; // Relative and absolute discounts $addabsolutediscount=' '.$langs->trans("AddGlobalDiscount").''; $addcreditnote=' '.$langs->trans("AddCreditNote").''; - print ''; + print ''; + print ''; + print ''; // Dates print ''; - print ''; - print ""; + print ''; - // Date payment term - print ''; - - // Conditions reglement - print ''; - print ''; - - // Mode de reglement - print ''; - - $nbrows=5; - if (! empty($conf->projet->enabled)) $nbrows++; - print '
'.$langs->trans('Ref').''.$object->ref.'
'.$langs->trans('Ref').''.$object->ref.'
'; - print ''; - print '
'; - print $langs->trans('RefCustomer'); - print '
'; - print '
'; - print $object->ref_client; - print '
'.$langs->trans('RefCustomer').''.$object->ref_client.'
'.$langs->trans("Company").''.$soc->getNomUrl(1,'compta').'
'.$langs->trans('Type').''; + print '
'.$langs->trans('Type').''; print $object->getLibType(); if ($object->type == Facture::TYPE_REPLACEMENT) { @@ -141,14 +132,15 @@ if ($id > 0 || ! empty($ref)) $facthatreplace->fetch($objectidnext); print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; } - print '
'.$langs->trans('Discounts'); - print ''; + print '
'.$langs->trans('Discounts').''; if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent); else print $langs->trans("CompanyHasNoRelativeDiscount"); @@ -187,7 +179,7 @@ if ($id > 0 || ! empty($ref)) } else { - if ($absolute_creditnote > 0) // If not linke will be added later + if ($absolute_creditnote > 0) // If not linked will be added later { if ($object->statut == 0 && $object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT) print ' - '.$addabsolutediscount.'
'; else print '.'; @@ -230,66 +222,17 @@ if ($id > 0 || ! empty($ref)) print $addabsolutediscount; //print '   -   '.$addcreditnote; // We disbale link to credit note }*/ - print '
'.$langs->trans("Date").''.dol_print_date($object->date,"daytext").'
'.dol_print_date($object->date,"daytext").'
'; - print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && $object->brouillon && $user->rights->facture->creer) print ''; - print '
'; - print $langs->trans('DateMaxPayment'); - print 'id.'">'.img_edit($langs->trans('SetDate'),1).'
'; - print '
'; - if ($object->type != Facture::TYPE_CREDIT_NOTE) - { - if ($action == 'editpaymentterm') - { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->date_lim_reglement,'paymentterm'); - } - else - { - print dol_print_date($object->date_lim_reglement,'daytext'); - if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! $object->am) print img_warning($langs->trans('Late')); - } - } - else - { - print ' '; - } - print '
'.$langs->trans("PaymentConditionsShort").''; - $form->form_conditions_reglement($_SERVER["PHP_SELF"]."?facid=$object->id",$object->cond_reglement_id,"none"); - print '
'; - print ''; - if ($action != 'editmode' && $object->brouillon && $user->rights->facture->creer) print ''; - print '
'; - print $langs->trans('PaymentMode'); - print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; - print '
'; - if ($action == 'editmode') - { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'mode_reglement_id'); - } - else - { - $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id,$object->mode_reglement_id,'none'); - } - print ''; + // Right part with $rowspan lines + $rowspan=5; + if (! empty($conf->projet->enabled)) $rowspan++; + print ''; /* * Documents @@ -303,7 +246,7 @@ if ($id > 0 || ! empty($ref)) $relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf'; // Define path to preview pdf file (preview precompiled "file.ext" are "file.ext_preview.png") - $fileimage = $file.'_preview.png'; // If PDF has 1 page + $fileimage = $file.'_preview.png'; // If PDF has 1 page $fileimagebis = $file.'_preview-0.pdf.png'; // If PDF has more than one page $relativepathimage = $relativepath.'_preview.png'; @@ -313,8 +256,8 @@ if ($id > 0 || ! empty($ref)) if (file_exists($file)) { $encfile = urlencode($file); - print_titre($langs->trans("Documents")); - print ''; + print '
'; + print ''; print ""; @@ -353,24 +296,32 @@ if ($id > 0 || ! empty($ref)) } print ""; + // Total HT print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; + // Total VAT + print ''; + print ''; + print ''; + + // Total TTC + print ''; + print ''; + print ''; // Statut - print ''; + print ''; + print ''; + print ''; // Projet if (! empty($conf->projet->enabled)) { $langs->load("projects"); - print ''; - print ''; + print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -777,7 +777,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $societestatic->name=$obj->name; $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); - print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 1b16064ed9e..308bcac6dc9 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -190,8 +190,11 @@ if ($_GET["action"] == 'create') print "
"; - print '
  '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 56278f15c5d..0ccf0dee6bf 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -626,7 +626,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $buttontitle=$langs->trans('ToMakePayment'); if ($facture->type == 2) $buttontitle=$langs->trans('ToMakePaymentBack'); - print '

'; + print '
'; print ' '.$checkboxlabel; /*if (! empty($conf->prelevement->enabled)) { @@ -634,7 +634,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if (! empty($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS)) print '
'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed"); }*/ print '


'; - print '
'; + print ''; } // Form to confirm payment diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 0c5eeca3689..fbf9512e438 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -358,14 +358,14 @@ if ($action == 'new') print $form->select_comptes($filteraccountid,'accountid',0,'courant <> 2',1); print ''; print '
'.$langs->trans("Documents").'
".$langs->trans("Bill")." PDF
'.$langs->trans("AmountHT").''.price($object->total_ht).''.$langs->trans("Currency".$conf->currency).'
' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans('AmountVAT').''.price($object->total_tva).''.$langs->trans('Currency'.$conf->currency).'
'.$langs->trans('AmountTTC').''.price($object->total_ttc).''.$langs->trans('Currency'.$conf->currency).'
'.$langs->trans('AmountVAT').'' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans('AmountTTC').'' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '
'.$langs->trans('Status').''.($object->getLibStatut(4,$totalpaye)).'
'.$langs->trans('Status').''.($object->getLibStatut(4,$totalpaye)).'
'.$langs->trans("Project").''; + print '
'.$langs->trans("Project").''; if ($object->fk_project > 0) { $project = New Project($db); @@ -391,14 +342,17 @@ if ($id > 0 || ! empty($ref)) else { // Facture non trouvee - print $langs->trans("ErrorBillNotFound",$_GET["facid"]); + print $langs->trans("ErrorBillNotFound",$id); } } +print ''; +print ''; +print '
'; +print '
'; // Si fichier png PDF d'1 page trouve if (file_exists($fileimage)) { - print ''; + print ''; } // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis)) @@ -411,11 +365,13 @@ elseif (file_exists($fileimagebis)) if (file_exists($dir_output.$preview)) { - print '

'; + print '

'; } } } - +print '

'; +print '
'; llxFooter(); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 4331d80925f..b924b059bfd 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1600,7 +1600,7 @@ class Facture extends CommonInvoice * * @param User $user Object user that validate * @param string $force_number Reference to force on invoice - * @param int $idwarehouse Id of warehouse to use for stock decrease + * @param int $idwarehouse Id of warehouse to use for stock decrease if option to decreasenon stock is on (0=no decrease) * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers * @return int <0 if KO, >0 if OK */ @@ -1728,7 +1728,7 @@ class Facture extends CommonInvoice $result=$this->client->set_as_client(); // Si active on decremente le produit principal et ses composants a la validation de facture - if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) + if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $idwarehouse > 0) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2203,7 +2203,15 @@ class Facture extends CommonInvoice $this->line->skip_update_total = $skip_update_total; // infos marge - $this->line->fk_fournprice = $fk_fournprice; + if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { + // POS or external module, take lowest buying price + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($this->db); + $productFournisseur->find_min_price_product_fournisseur($fk_product); + $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; + } else { + $this->line->fk_fournprice = $fk_fournprice; + } $this->line->pa_ht = $pa_ht; if (is_array($array_option) && count($array_option)>0) { @@ -3498,6 +3506,14 @@ class FactureLigne extends CommonInvoiceLine return -1; } } + + // POS or by external module, take lowest buying price + if (!empty($this->fk_product) && empty($this->fk_fournprice) && empty($this->pa_ht)) { + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($this->db); + $productFournisseur->find_min_price_product_fournisseur($this->fk_product); + $this->fk_fournprice = $productFournisseur->product_fourn_price_id; + } $this->db->begin(); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index fc2943f05e0..2359d70d07b 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -678,7 +678,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $societestatic->name=$obj->name; $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); - print '
'.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->total_ttc-$obj->tot_fttc).''.price($obj->total).''.price($obj->total_ttc).''.price($obj->am).'
'; - print '
'; + print '
'; print ''; if ($filterdate || $filteraccountid > 0) { print '   '; print ''; } - print '
'; + print ''; //print ''; print ''; print '
'; diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 7e26fa5789f..1c452bc0b02 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -312,13 +312,11 @@ if ($_GET["action"] == 'create') print "
"; - print '
'; - + print '
'; print ''; - print '   '; + print '     '; print ''; - - print '
'; + print ''; print "\n"; } diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index e2a5e846b0a..9875c8df906 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -218,7 +218,7 @@ if ($id > 0) print '
'; print '';*/ print '
'; - print '
'; + print '
'; print ''; } @@ -235,7 +235,7 @@ if ($id > 0) print ''; print ''; print '
'.$langs->trans("ThisWillAlsoAddPaymentOnInvoice"); - print '
'; + print '
'; print ''; } diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index f1617979645..2af8a25b003 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -216,7 +216,7 @@ if ($id) print '
'; //Confirm Button - print '
'; + print '
'; print ''; } diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 3ee796c6134..16ef809f713 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -274,8 +274,11 @@ if ($action == 'create') print "
"; - print '
  '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 268a1af8e66..b612a9b6459 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -230,8 +230,11 @@ if ($action == 'create') print "
"; - print '
  '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index db83554c7ae..bcdea083c3f 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -614,14 +614,14 @@ else print "

"; - print '
'; + print '
'; print ''; if (! empty($backtopage)) { print '     '; print ''; } - print '
'; + print ''; print ""; } @@ -858,11 +858,11 @@ else print '
'; - print '
'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; print ""; } diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 92ba03e9861..19644fe5bf5 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -145,11 +145,11 @@ if ($action == 'edit') print "
"; - print '
'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; print ""; } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 20fd6939f5d..cea29c96793 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -536,10 +536,10 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model=$object->modelpdf; - if (empty($model)) { $tmp=getListOfModels($db, 'contract'); $keys=array_keys($tmp); $model=$keys[0]; } + $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['prod_entry_mode']); @@ -1026,7 +1026,7 @@ if ($action == 'create') print ''; } - print '
'; + print '
'; print "\n"; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 4abfb1f9c86..1399ae40215 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2385,39 +2385,4 @@ class ContratLigne extends CommonObject } } - /** - * Create a contract document on disk using template defined into CONTRACT_ADDON_PDF - * - * @param string $modele force le modele a utiliser ('' par defaut) - * @param Translate $outputlangs objet lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @return int 0 if KO, 1 if OK - */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) - { - global $conf,$langs,$user,$hookmanager; - - $langs->load("contracts"); - - // Positionne modele sur le nom du modele de contrat a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->CONTRACT_ADDON_PDF)) - { - $modele = $conf->global->CONTRACT_ADDON_PDF; - } - else - { - $modele = 'strato'; - } - } - - $modelpath = "core/modules/contract/doc/"; - - return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); - } } - - diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index debe18e995e..b83ecc329b7 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -118,6 +118,7 @@ if ($resql) print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], '&search_contract='.$search_contract.'&search_name='.$search_name, $sortfield, $sortorder,'',$num); + print '
'; print ''; print ''; @@ -136,7 +137,6 @@ if ($resql) print ''; print "\n"; - print ''; print ''; print ''; print '\n"; - print ''; $var=true; while ($i < min($num,$limit)) @@ -179,7 +178,8 @@ if ($resql) } $db->free($resql); - print "
'.$staticcontratligne->LibStatut(5,3).'
'; @@ -153,7 +153,6 @@ if ($resql) print ''; print ''; print "
"; + print ''; + print ''; } else { diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index b272f350717..9b2a5437b8a 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -215,9 +215,9 @@ class box_graph_invoices_permonth extends ModeleBoxes $stringtoshow.='
'; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index c882acd40c1..7c2aa53da97 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -214,9 +214,9 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 5084691d321..75f0f60660f 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -215,9 +215,9 @@ class box_graph_orders_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index f398ae9dcb1..70d62cac348 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -214,9 +214,9 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 974ccaed446..fd866f5df89 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -218,9 +218,9 @@ class box_graph_propales_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfProposalsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfProposalsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfProposalsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfProposalsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index c2918ddf1ee..c6b6dad7acb 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -228,7 +228,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" print ''; // The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object print img_picto($langs->trans("MoveBox",$this->box_id),'grip_title','class="boxhandle hideonsmartphone" style="cursor:move;"'); - print img_picto($langs->trans("Close",$this->box_id),'close_title','class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose'.$this->box_id.'"'); + print img_picto($langs->trans("Close2",$this->box_id),'close_title','class="boxclose" rel="x:y" style="cursor:pointer;" id="imgclose'.$this->box_id.'"'); $label=$head['text']; if (! empty($head['graph'])) $label.=' ('.$langs->trans("Graph").')'; print ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 87ee2f1a1d2..1b0438bdea1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3016,30 +3016,33 @@ abstract class CommonObject $marginInfo = $this->getMarginInfos($force_price); - print $langs->trans('ShowMarginInfos').' : '; - $hidemargininfos = $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']; - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + if (! empty($conf->global->MARGIN_ADD_SHOWHIDE_BUTTON)) // FIXME Warning this feature rely on an external js file that may be removed. Using native js function document.cookie should be better + { + print $langs->trans('ShowMarginInfos').' : '; + $hidemargininfos = $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']; + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; - print ''; - if (!empty($hidemargininfos)) print ''; - - print ''; + print ''; + if (!empty($hidemargininfos)) print ''; + } + + print '
'; print ''; - print ''; - print ''; + print ''; + print ''; if ($conf->global->MARGIN_TYPE == "1") - print ''; + print ''; else - print ''; - print ''; + print ''; + print ''; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; + print ''; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; + print ''; print ''; if (! empty($conf->product->enabled)) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a4d491683b5..b70820463b0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2622,7 +2622,7 @@ class Form $i++; } print ""; - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); } else { print $langs->trans("NoShippingMethodDefined"); } diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 042474781d7..30ecadedb55 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -53,9 +53,10 @@ class FormAdmin * @param array $filter Array of keys to exclude in list * @param int $showempty Add empty value * @param int $showwarning Show a warning if language is not complete + * @param int $disabled Disable edit of select * @return string Return HTML select string with list of languages */ - function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0) + function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0,$disabled=0) { global $langs; @@ -63,7 +64,7 @@ class FormAdmin $out=''; - $out.= ''; if ($showempty) { $out.= ''."\n"; + $out.= ''."\n"; } $out.= '
'.$langs->trans('Margins').''.$langs->trans('SellingPrice').''.$langs->trans('Margins').''.$langs->trans('SellingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('CostPrice').''.$langs->trans('Margin').''.$langs->trans('CostPrice').''.$langs->trans('Margin').''.$langs->trans('MarginRate').''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').''.$langs->trans('MarkRate').'
'; + $out.= '
'; $out.= 'withfile == 2 && $conf->use_javascript_ajax) @@ -664,7 +664,7 @@ class FormMail $out.= '     '; $out.= ''; } - $out.= '
'."\n"; diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 941cef40be6..51841a27e24 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -320,15 +320,14 @@ function limitChars(textarea, limit, infodiv) print "\n"; - print '
'; - print "trans("SendSms")."\""; - print ">"; + print '
'; + print ''; if ($this->withcancel) { - print "     "; - print "trans("Cancel")."\">"; + print '  &nbnp;  '; + print ''; } - print "
\n"; + print ''; print "
\n"; print "\n"; diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index ab26ee68317..14d1bec0841 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -40,14 +40,14 @@ class InfoBox /** * Return array of boxes qualified for area and user * - * @param DoliDB $db Database handler - * @param string $mode 'available' or 'activated' - * @param string $zone Name or area (-1 for all, 0 for Homepage, 1 for xxx, ...) - * @param User $user Object user to filter - * @param array $excludelist Array of box id (box.box_id = boxes_def.rowid) to exclude - * @return array Array of boxes + * @param DoliDB $db Database handler + * @param string $mode 'available' or 'activated' + * @param string $zone Name or area (-1 for all, 0 for Homepage, 1 for xxx, ...) + * @param User|null $user Object user to filter + * @param array $excludelist Array of box id (box.box_id = boxes_def.rowid) to exclude + * @return array Array of boxes */ - static function listBoxes($db, $mode, $zone, $user, $excludelist=array()) + static function listBoxes($db, $mode, $zone, $user=null, $excludelist=array()) { global $conf; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 075baf41161..dd1615d7427 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1193,7 +1193,7 @@ function showModulesExludedForExternal($modules) $text .= $langs->trans('Module'.$module->numero.'Name'); } } - return img_picto($langs->trans('InfoAdmin'), 'star').' '.$text; + return $text; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index cc06786e602..84bf351e7b9 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -766,11 +766,12 @@ function dol_bc($var,$moreclass='') * @param Object $object A company or contact object * @param int $withcountry 1=Add country into address string * @param string $sep Separator to use to build string + * @param Tranlsate $outputlangs Object lang that contains language for text translation. * @return string Formated string */ -function dol_format_address($object,$withcountry=0,$sep="\n") +function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='') { - global $conf; + global $conf,$langs; $ret=''; $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); @@ -815,8 +816,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n") $ret.=", ".$object->state; } } - - if ($withcountry) $ret.=($object->country?$sep.$object->country:''); + if (! is_object($outputlangs)) $outputlangs=$langs; + if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):''); return $ret; } @@ -2905,7 +2906,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou * 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT) * 'MS'=Round to Max Shown (MAIN_MAX_DECIMALS_SHOWN) * @param int $alreadysqlnb Put 1 if you know that content is already universal format number - * @return string Amount with universal numeric format (Example: '99.99999') + * @return string Amount with universal numeric format (Example: '99.99999') or unchanged text if conversion fails. * * @see price Opposite function of price2num */ diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index bc0a9e71f38..5fc8e16381a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -312,7 +312,10 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if ($mode == 'source') { - $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany))."\n"; + $withCountry = 0; + if (!empty($sourcecompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) $withCountry = 1; + + $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany, $withCountry, "\n", $outputlangs))."\n"; if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS)) { diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index c411ef96039..8d5cc637898 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -231,7 +231,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM print ''; print ''; print ''; print ''; print ''."\n"; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 781de5f2913..aaf24d5b07e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -436,7 +436,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print ''; print ''; print ''; print ''; print ''."\n"; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 3e7803af70a..510a1bd88a1 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1188,7 +1188,7 @@ class pdf_einstein extends ModelePDFCommandes if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index 0216bd4163a..2b8aaa21818 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -1145,7 +1145,7 @@ class pdf_proforma extends ModelePDFCommandes if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index bd4cc333743..be686377ce3 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -53,6 +53,18 @@ class pdf_strato extends ModelePDFContract var $marge_haute; var $marge_basse; + /** + * Issuer + * @var Societe + */ + public $emetteur; + + /** + * Recipient + * @var Societe + */ + public $recipient; + /** * Constructor * @@ -543,7 +555,7 @@ class pdf_strato extends ModelePDFContract $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; @@ -581,17 +593,17 @@ class pdf_strato extends ModelePDFContract $result=$object->fetch_contact($arrayidcontact[0]); } + $this->recipient = $object->client; + // Recipient name - if (! empty($usecontact)) - { + if (! empty($usecontact)) { // On peut utiliser le nom de la societe du contact if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname; else $socname = $object->client->name; - $this->recipient->name=$outputlangs->convToOutputCharset($socname); + $this->recipient->name = $outputlangs->convToOutputCharset($socname); } - else - { - $this->recipient->name=$outputlangs->convToOutputCharset($object->client->name); + else { + $this->recipient->name = $outputlangs->convToOutputCharset($object->client->name); } $carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target'); diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 2dc9c72968c..ca3f3510eee 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -157,8 +157,8 @@
-
__Date__ & __Signature__
-
__NOW__
+
__Date__ & __Signature__
+
__NOW__
diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index bdf61e3ea72..145eeafcdde 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -539,7 +539,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetTextColor(0,0,0); // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); $pdf->SetFont('','', $default_font_size - 3); $pdf->SetXY($blSocX,$blSocY+4); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index ccb4f93a611..ea6601b8396 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -587,7 +587,7 @@ class pdf_rouget extends ModelePdfExpedition $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posx=$this->marge_gauche; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 35a0ff47aa0..6d1f5636b85 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1434,7 +1434,7 @@ class pdf_crabe extends ModelePDFFactures if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 0d09aa7ce6c..626c2830981 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -522,7 +522,7 @@ class pdf_soleil extends ModelePDFFicheinter $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index b8482a24c3e..50da9252ecc 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -27,8 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; /** - * \class MailingTargets - * \brief Parent class of emailing target selectors modules + * Parent class of emailing target selectors modules */ class MailingTargets // This can't be abstract as it is used for some method { diff --git a/htdocs/core/modules/modSyncSupplierWebServices.class.php b/htdocs/core/modules/modSyncSupplierWebServices.class.php old mode 100755 new mode 100644 diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 1cafa394e66..35953b8521f 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1284,7 +1284,7 @@ class pdf_azur extends ModelePDFPropales $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 5865d431132..6b57b961da4 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -970,7 +970,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 5faed78985c..29bd483b39b 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -1022,7 +1022,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 2d18c6154f8..3a51a5f7567 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -173,11 +173,11 @@ if (! empty($conf->use_javascript_ajax)) print '
'; print ''.$langs->trans("Recenter").''; print $langs->trans("DefineNewAreaToPick").'...
'; - print '
'; + print '
'; print '
'; print ''; print '
'; - print '

'; + print '
'; print '
'.$langs->trans("NewSizeAfterCropping").': diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 23d8dd4f326..61c26244692 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -46,7 +46,7 @@ $(document).ready(function () { -
+
@@ -152,7 +151,7 @@ if ($forgetpasslink || $helpcenterlink) if ($dol_use_jmobile) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$dol_use_jmobile; echo '
'; - echo '
'; + echo '
'; if ($forgetpasslink) { echo '('; echo $langs->trans('PasswordForgotten'); @@ -179,7 +178,7 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file //if (! empty($conf->global->MAIN_OPENIDURL_PERUSER)) $url= echo '
'; - echo '
'; + echo '
'; $url=$conf->global->MAIN_AUTHENTICATION_OPENID_URL; if (! empty($url)) print ''.$langs->trans("LoginUsingOpenID").''; @@ -217,7 +216,7 @@ if (isset($conf->file->main_authentication) && preg_match('/openid/',$conf->file -
+
google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AD_CLI if (empty($conf->dol_use_jmobile)) { ?> -

+