diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index b3367ad1b8e..fb63e503423 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -171,8 +171,8 @@ elseif ($action == "add") { $object->doc_ref = GETPOST('doc_ref', 'alpha'); $object->code_journal = $journal_code; $object->journal_label = $journal_label; - $object->fk_doc = GETPOST('fk_doc', 'int'); - $object->fk_docdet = GETPOST('fk_docdet', 'int'); + $object->fk_doc = (int) GETPOST('fk_doc', 'int'); + $object->fk_docdet = (int) GETPOST('fk_docdet', 'int'); if (floatval($debit) != 0.0) { $object->montant = $debit; diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index adda9ceb238..47e22a3bf62 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -162,11 +162,12 @@ class BOMs extends DolibarrApi if ($result) { $num = $db->num_rows($result); + $i = 0; while ($i < $num) { $obj = $db->fetch_object($result); $bom_static = new BOM($db); - if($bom_static->fetch($obj->rowid)) { + if ($bom_static->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($bom_static); } $i++; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e962e59264c..367fae984b6 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -399,9 +399,24 @@ abstract class CommonObject */ public $location_incoterms; + /** + * @var string The name + */ public $name; + + /** + * @var string The lastname + */ public $lastname; + + /** + * @var string The firstname + */ public $firstname; + + /** + * @var string The civility code, not an integer + */ public $civility_id; // Dates diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index f71a1c19b96..516df2ee6ef 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -104,8 +104,8 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode // Mask parameter //$texte.= ''.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):'; $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= '  '; $texte.= ''; $texte.= ''; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index e37ce3d9840..f6492b3c78f 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -78,9 +78,9 @@ class mod_bom_advanced extends ModeleNumRefboms // Parametrage du prefix $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index da1ec40620c..7ec2a775b96 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -72,9 +72,9 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts // Parametrage du prefix $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= ' '; $texte.= ''; @@ -91,7 +91,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts */ public function getExample() { - global $conf,$langs,$mysoc; + global $conf,$langs,$mysoc; $old_code_client=$mysoc->code_client; $mysoc->code_client='CCCCCCCCCC'; diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 40ca0e2e222..fbe741ac2f8 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -78,9 +78,9 @@ class mod_commande_saphir extends ModeleNumRefCommandes // Parametrage du prefix $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index 3dfa0533cbe..15062a3ddca 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -81,8 +81,8 @@ class mod_contract_magre extends ModelNumRefContracts $tooltip.=$langs->trans("GenericMaskCodes5"); $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= '  '; $texte.= ''; $texte.= ''; $texte.= ''; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 7b20d1df4d8..539a5ad63b6 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -79,8 +79,8 @@ class mod_expedition_ribera extends ModelNumRefExpedition $tooltip.=$langs->trans("GenericMaskCodes5"); $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= '  '; $texte.= ''; $texte.= ''; $texte.= ''; diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 2311de4841a..e9d5a6e8e3a 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -82,9 +82,9 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport // Parametrage du prefix $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 2ef492660b2..b6f36f69e9d 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -76,25 +76,25 @@ class mod_facture_mercure extends ModeleNumRefFactures // Parametrage du prefix $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").'):'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; // Parametrage du prefix des replacement $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte.= ''; // Parametrage du prefix des avoirs $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte.= ''; // Parametrage du prefix des acomptes $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte.= ''; $texte.= ''; diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 6e588aed098..c01fa9d2e09 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2015 Regis Houssin +/* Copyright (C) 2005-2008 Laurent Destailleur + * Copyright (C) 2005-2015 Regis Houssin * * 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 @@ -18,33 +18,46 @@ */ /** - * \file htdocs/core/modules/facture/mod_facture_terre.php - * \ingroup facture - * \brief File containing class for numbering module Terre + * \file htdocs/core/modules/facture/mod_facture_terre.php + * \ingroup facture + * \brief File containing class for numbering module Terre */ require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php'; -/** \class mod_facture_terre - * \brief Classe du modele de numerotation de reference de facture Terre +/** + * \class mod_facture_terre + * \brief Classe du modele de numerotation de reference de facture Terre */ class mod_facture_terre extends ModeleNumRefFactures { - /** - * Dolibarr version of the loaded document - * @public string + /** + * Dolibarr version of the loaded document 'development', 'experimental', 'dolibarr' + * @var string */ - public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + public $version = 'dolibarr'; - public $prefixinvoice='FA'; + /** + * Prefix for invoices + * @var string + */ + public $prefixinvoice='FA'; - public $prefixcreditnote='AV'; + /** + * Prefix for credit note + * @var string + */ + public $prefixcreditnote='AV'; - public $prefixdeposit='AC'; + /** + * Prefix for deposit + * @var string + */ + public $prefixdeposit='AC'; - /** - * @var string Error code (or message) - */ - public $error=''; + /** + * @var string Error code (or message) + */ + public $error=''; /** @@ -162,7 +175,7 @@ class mod_facture_terre extends ModeleNumRefFactures /** * Return next value not used or last value used * - * @param Societe $objsoc Object third party + * @param Societe $objsoc Object third party * @param Facture $invoice Object invoice * @param string $mode 'next' for next value or 'last' for last value * @return string Value @@ -234,10 +247,10 @@ class mod_facture_terre extends ModeleNumRefFactures /** * Return next free value * - * @param Societe $objsoc Object third party - * @param string $objforref Object for number to search - * @param string $mode 'next' for next value or 'last' for last value - * @return string Next free value + * @param Societe $objsoc Object third party + * @param string $objforref Object for number to search + * @param string $mode 'next' for next value or 'last' for last value + * @return string Next free value */ public function getNumRef($objsoc, $objforref, $mode = 'next') { diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index db0633c8e9d..0662c367a40 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -232,10 +232,10 @@ print ''; print ''; print ''; print ''; -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; print "\n"; clearstatcache(); @@ -272,20 +272,20 @@ if (is_resource($handle)) { if ($conf->global->DON_ADDON_MODEL == $name) { - print "'; } else { - print "'; } } else { - print ""; } @@ -293,13 +293,13 @@ if (is_resource($handle)) // Default if ($conf->global->DON_ADDON_MODEL == "$name") { - print "'; } else { - print "'; } @@ -314,12 +314,12 @@ if (is_resource($handle)) $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); - print ''; // Preview - print ''; @@ -340,7 +340,7 @@ print load_fiche_titre($langs->trans("Options"), '', ''); print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Activated").''.$langs->trans("Default").''.$langs->trans("ShortInfo").''.$langs->trans("Preview").''.$langs->trans("Activated").''.$langs->trans("Default").''.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
\n"; + print "\n"; print img_picto($langs->trans("Enabled"), 'switch_on'); print '\n"; + print "\n"; print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Enabled"), 'switch_on').''; print '\n"; + print "\n"; print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; + print ""; print img_picto($langs->trans("Default"), 'on'); print '"; + print ""; print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; print ''; + print ''; print $form->textwithpicto('', $htmltooltip, -1, 0); print ''; + print ''; print ''.img_object($langs->trans("Preview"), 'generic').''; print '
'; print ''; print ''; -print '\n"; +print '\n"; print ''; print "\n"; @@ -352,7 +352,7 @@ print ''; print ''; -print ''; print ''; -print '\n"; print ''; @@ -387,7 +387,7 @@ print ''; print '\n"; @@ -405,12 +405,12 @@ if (preg_match('/fr/i', $conf->global->MAIN_INFO_SOCIETE_COUNTRY)) print '
'.$langs->trans("Parameters").''.$langs->trans("Value")."'.$langs->trans("Value")."
'; print $form->textwithpicto($langs->trans("DonationUserThirdparties"), $langs->trans("DonationUserThirdpartiesDesc")); print ''; +print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('DONATION_USE_THIRDPARTIES'); } else { @@ -366,7 +366,7 @@ print '
'; $label = $langs->trans("AccountAccounting"); print ''; +print ''; if (! empty($conf->accounting->enabled)) { print $formaccounting->select_account($conf->global->DONATION_ACCOUNTINGACCOUNT, 'DONATION_ACCOUNTINGACCOUNT', 1, '', 1, 1); @@ -375,7 +375,7 @@ else { print ''; } -print ''; +print ''; print ''; print "
'; print $langs->trans("FreeTextOnDonations").' '.img_info($langs->trans("AddCRIfTooLong")).'
'; print ''; -print '
'; +print ''; print ''; print "
'; print ''; print ''."\n"; - print ''."\n"; + print ''."\n"; print "\n"; print ''; print ''; - print ''; print ''; - print ''; print ''; - print ''; print ''; print ''; - print ''; + print ''; print ''; while ($i < $num) @@ -758,7 +758,7 @@ if ($object->socid) { print '\n"; $labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type; print "\n"; - print '\n"; + print '\n"; print ""; $totalpaid += $objp->amount; $i++; @@ -766,13 +766,13 @@ if ($object->socid) { if ($object->paid == 0) { - print "\n"; - print "\n"; + print "\n"; + print "\n"; $remaintopay = $object->amount - $totalpaid; - print ""; - print '\n"; + print ""; + print '\n"; } print "
'.$langs->trans("Parameters").''.$langs->trans("Status").''.$langs->trans("Status").'
' . $langs->trans("DONATION_ART200") . ''; + print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('DONATION_ART200'); } else { @@ -421,7 +421,7 @@ if ($conf->use_javascript_ajax) { print '
' . $langs->trans("DONATION_ART238") . ''; + print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('DONATION_ART238'); } else { @@ -432,7 +432,7 @@ if ($conf->use_javascript_ajax) { print '
' . $langs->trans("DONATION_ART885") . ''; + print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('DONATION_ART885'); } else { diff --git a/htdocs/don/admin/donation_extrafields.php b/htdocs/don/admin/donation_extrafields.php index 1bfc12f2758..b01fc176eae 100644 --- a/htdocs/don/admin/donation_extrafields.php +++ b/htdocs/don/admin/donation_extrafields.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015 Juanjo Menent +/* Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Juanjo Menent * * 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 @@ -17,9 +17,9 @@ */ /** - * \file htdocs/don/admin/donation_extrafields.php - * \ingroup donations - * \brief Page to setup extra fields of donations + * \file htdocs/don/admin/donation_extrafields.php + * \ingroup donations + * \brief Page to setup extra fields of donations */ require '../../main.inc.php'; diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 02a35deb70d..d88017e52ea 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -746,7 +746,7 @@ if ($object->socid) { print ''.$langs->trans("RefPayment").''.$langs->trans("Date").''.$langs->trans("Type").''.$langs->trans("Amount").''.$langs->trans("Amount").'
'.dol_print_date($db->jdate($objp->dp), 'day')."".$labeltype.' '.$objp->num_payment."'.price($objp->amount)."'.price($objp->amount)."
".$langs->trans("AlreadyPaid")." :".price($totalpaid)."
".$langs->trans("AmountExpected")." :".price($object->amount)."
".$langs->trans("AlreadyPaid")." :".price($totalpaid)."
".$langs->trans("AmountExpected")." :".price($object->amount)."
".$langs->trans("RemainderToPay")." :'.price($remaintopay)."
".$langs->trans("RemainderToPay")." :'.price($remaintopay)."
"; $db->free($resql); diff --git a/htdocs/don/class/api_donations.class.php b/htdocs/don/class/api_donations.class.php index 8762f763da7..efcd418cbc1 100644 --- a/htdocs/don/class/api_donations.class.php +++ b/htdocs/don/class/api_donations.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2019 Laurent Destailleur +/* Copyright (C) 2019 Thibault FOUCART + * Copyright (C) 2019 Laurent Destailleur * * 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 @@ -58,7 +58,7 @@ class Donations extends DolibarrApi * * @param int $id ID of order * @return array|mixed data without useless information - * + * * @throws RestException */ public function get($id) @@ -89,13 +89,13 @@ class Donations extends DolibarrApi * * Get a list of donations * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $thirdparty_ids Thirdparty ids to filter orders of. {@example '1' or '1,2,3'} {@pattern /^[0-9,]*$/i} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" - * @return array Array of order objects + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $thirdparty_ids Thirdparty ids to filter orders of. {@example '1' or '1,2,3'} {@pattern /^[0-9,]*$/i} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @return array Array of order objects * * @throws RestException */ @@ -177,8 +177,8 @@ class Donations extends DolibarrApi public function post($request_data = null) { if (! DolibarrApiAccess::$user->rights->don->creer) { - throw new RestException(401, "Insuffisant rights"); - } + throw new RestException(401, "Insuffisant rights"); + } // Check mandatory fields $result = $this->_validate($request_data); diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 6f238c97d1b..d632f316a25 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -1,7 +1,7 @@ - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin +/* Copyright (C) 2001-2002 Rodolphe Quiedeville + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin * * 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 @@ -126,7 +126,7 @@ foreach ($listofstatus as $status) if ($conf->use_javascript_ajax) { - print ''; + print ''; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $dolgraph = new DolGraph(); @@ -143,9 +143,9 @@ if ($conf->use_javascript_ajax) print ''; print ''.$langs->trans("Status").''; -print ''.$langs->trans("Number").''; -print ''.$langs->trans("Total").''; -print ''.$langs->trans("Average").''; +print ''.$langs->trans("Number").''; +print ''.$langs->trans("Total").''; +print ''.$langs->trans("Average").''; print ''; $total=0; @@ -155,9 +155,9 @@ foreach ($listofstatus as $status) print ''; print ''.$donstatic->LibStatut($status, 4).''; - print ''.(! empty($nb[$status])?$nb[$status]:' ').''; - print ''.(! empty($nb[$status])?price($somme[$status], 'MT'):' ').''; - print ''.(! empty($nb[$status])?price(price2num($somme[$status]/$nb[$status], 'MT')):' ').''; + print ''.(! empty($nb[$status])?$nb[$status]:' ').''; + print ''.(! empty($nb[$status])?price($somme[$status], 'MT'):' ').''; + print ''.(! empty($nb[$status])?price(price2num($somme[$status]/$nb[$status], 'MT')):' ').''; $totalnb += (! empty($nb[$status])?$nb[$status]:0); $total += (! empty($somme[$status])?$somme[$status]:0); print ""; @@ -165,9 +165,9 @@ foreach ($listofstatus as $status) print ''; print ''.$langs->trans("Total").''; -print ''.$totalnb.''; -print ''.price($total, 'MT').''; -print ''.($totalnb?price(price2num($total/$totalnb, 'MT')):' ').''; +print ''.$totalnb.''; +print ''.price($total, 'MT').''; +print ''.($totalnb?price(price2num($total/$totalnb, 'MT')):' ').''; print ''; print ""; @@ -218,14 +218,14 @@ if ($resql) print dolGetFirstLastname($obj->lastname, $obj->firstname); print ''; - print ''; + print ''; print price($obj->amount, 1); print ''; // Date - print ''.dol_print_date($db->jdate($obj->datem), 'day').''; + print ''.dol_print_date($db->jdate($obj->datem), 'day').''; - print ''.$donation_static->LibStatut($obj->fk_statut, 5).''; + print ''.$donation_static->LibStatut($obj->fk_statut, 5).''; print ''; $i++; diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 3a0ec6d189a..52525009516 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -1,9 +1,9 @@ - * Copyright (C) 2004-2018 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2019 Thibault FOUCART +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004-2018 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2019 Thibault FOUCART * * 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 @@ -20,9 +20,9 @@ */ /** - * \file htdocs/don/list.php - * \ingroup donations - * \brief List of donations + * \file htdocs/don/list.php + * \ingroup donations + * \brief List of donations */ require '../main.inc.php'; @@ -178,18 +178,18 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ' '; print ''; if (! empty($conf->projet->enabled)) { - print ''; + print ''; print ' '; print ''; } - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; print ''; @@ -199,14 +199,14 @@ if ($resql) print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "d.societe", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "d.lastname", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "d.datedon", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($conf->projet->enabled)) { $langs->load("projects"); print_liste_field_titre("Project", $_SERVER["PHP_SELF"], "fk_projet", "", $param, "", $sortfield, $sortorder); } - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "d.amount", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre(''); print "\n"; @@ -222,7 +222,7 @@ if ($resql) print "".$donationstatic->getNomUrl(1)."\n"; print "".$objp->societe."\n"; print "".$donationstatic->getFullName($langs)."\n"; - print ''.dol_print_date($db->jdate($objp->datedon), 'day').''; + print ''.dol_print_date($db->jdate($objp->datedon), 'day').''; if (! empty($conf->projet->enabled)) { print ""; @@ -238,20 +238,20 @@ if ($resql) else print ' '; print "\n"; } - print ''.price($objp->amount).''; - print ''.$donationstatic->LibStatut($objp->statut, 5).''; + print ''.price($objp->amount).''; + print ''.$donationstatic->LibStatut($objp->statut, 5).''; print ''; print ""; $i++; } - print ""; - print ''; + print ""; + print ''; print "\n"; $db->free($resql); } else { - dol_print_error($db); + dol_print_error($db); } llxFooter(); diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index 43e329f3d08..bbf2163b9af 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2019 Frédéric 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 @@ -216,9 +217,9 @@ if ($resql) print '
'; print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print "\n"; if ($num > 0) @@ -234,14 +235,14 @@ if ($resql) print $don->getNomUrl(1); print "\n"; // Expected to pay - print ''; + print ''; // Status - print ''; + print ''; // Amount payed - print ''; + print ''; print "\n"; - if ($objp->paid == 1) // If at least one invoice is paid, disable delete - { + if ($objp->paid == 1) { + // If at least one invoice is paid, disable delete $disable_delete = 1; } $total = $total + $objp->amount; diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index 640a94ff729..0172765b19c 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -35,8 +35,7 @@ $amounts = array(); // Security check $socid=0; -if ($user->societe_id > 0) -{ +if ($user->societe_id > 0) { $socid = $user->societe_id; } @@ -244,10 +243,10 @@ if (GETPOST('action', 'aZ09') == 'create') print '
'.$langs->trans('Donation').''.$langs->trans('ExpectedToPay').''.$langs->trans('Status').''.$langs->trans('PayedByThisPayment').''.$langs->trans('ExpectedToPay').''.$langs->trans('Status').''.$langs->trans('PayedByThisPayment').'
'.price($objp->d_amount).''.price($objp->d_amount).''.$don->getLibStatut(4, $objp->amount).''.$don->getLibStatut(4, $objp->amount).''.price($objp->amount).''.price($objp->amount).'
'; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print "\n"; $total=0; @@ -259,13 +258,13 @@ if (GETPOST('action', 'aZ09') == 'create') print ''; - print '"; + print '"; - print '"; + print '"; - print '"; + print '"; - print ''; - print ''; - print ""; - print ""; - print ""; - print ''; + print ''; + print ""; + print ""; + print ""; + print ''; print "\n"; } diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 4c360786425..cc25ea8ae7b 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -253,7 +253,7 @@ print '
'; arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print ''; - print '
'; + print ''; print '
'.$langs->trans("Amount").''.$langs->trans("AlreadyPaid").''.$langs->trans("RemainderToPay").''.$langs->trans("Amount").''.$langs->trans("Amount").''.$langs->trans("AlreadyPaid").''.$langs->trans("RemainderToPay").''.$langs->trans("Amount").'
'.price($objp->amount)."'.price($objp->amount)."'.price($sumpaid)."'.price($sumpaid)."'.price($objp->amount - $sumpaid)."'.price($objp->amount - $sumpaid)."'; + print ''; if ($sumpaid < $objp->amount) { $namef = "amount_".$objp->id; @@ -287,11 +286,11 @@ if (GETPOST('action', 'aZ09') == 'create') { // Print total print '
'.$langs->trans("Total").':".price($total_ttc)."".price($totalrecu)."".price($total_ttc - $totalrecu)." '.$langs->trans("Total").':".price($total_ttc)."".price($totalrecu)."".price($total_ttc - $totalrecu)." 
'; print ''; print '

'; @@ -262,10 +262,10 @@ print '
'; print '
'; print ''; print ''; -print ''; -print ''; -/*print ''; -print '';*/ +print ''; +print ''; +/*print ''; +print '';*/ print ''; $oldyear=0; @@ -276,19 +276,19 @@ foreach ($data as $val) { // If we have empty year $oldyear--; print ''; - print ''; + print ''; - print ''; - /*print ''; - print '';*/ + print ''; + /*print ''; + print '';*/ print ''; } print ''; - print ''; - print ''; - /*print ''; - print '';*/ + print ''; + print ''; + /*print ''; + print '';*/ print ''; $oldyear=$year; } @@ -301,7 +301,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").''.$langs->trans("Year").''.$langs->trans("NbOfSendings").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").'
'.$oldyear.''.$oldyear.'000000
'.$year.''.$val['nb'].''.price(price2num($val['total'],'MT'),1).''.price(price2num($val['avg'],'MT'),1).''.$year.''.$val['nb'].''.price(price2num($val['total'],'MT'),1).''.price(price2num($val['avg'],'MT'),1).'
'; + print ''; } // Product/Service print ''; // Qty - print ''; + print ''; if ($origin && $origin_id > 0) { - print ''; + print ''; } if ($action == 'editline') { $editColspan = 3; if (empty($conf->stock->enabled)) $editColspan--; if (empty($conf->productbatch->enabled)) $editColspan--; - print ''; + print ''; } else { - print ''; + print ''; } if (! empty($conf->stock->enabled)) { @@ -2057,9 +2057,9 @@ elseif ($id || $ref) print ''; } } - print ''; - print ''; - //print ''; + print ''; + print ''; + //print ''; if ($object->statut == 0) { print ''; @@ -2135,7 +2135,7 @@ elseif ($id || $ref) // Adds a line numbering column if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ''; + print ''; } // Predefined product or service @@ -2187,12 +2187,12 @@ elseif ($id || $ref) } // Qty ordered - print ''; + print ''; // Qty in other shipments (with shipment and warehouse used) if ($origin && $origin_id > 0) { - print ''; if ($action != 'editwarehouse' && $user->rights->commande->creer) - print ''; + print ''; print '
'; +print ''; - if ($action != 'editshipping_method_id') print ''; + if ($action != 'editshipping_method_id') print ''; print '
'; if ($mesg) { print $mesg; } else { print $px1->show(); @@ -323,8 +323,8 @@ dol_fiche_end(); // TODO USe code similar to commande/stats/index.php instead of this one. /* print ''; -print ''; -print ''; +print ''; +print ''; $sql = "SELECT count(*) as nb, date_format(date_expedition,'%Y') as dm"; $sql.= " FROM ".MAIN_DB_PREFIX."expedition"; @@ -343,7 +343,7 @@ if ($resql) $nbproduct = $row[0]; $year = $row[1]; print ""; - print ''; + print ''; $i++; } } diff --git a/htdocs/don/tpl/linkedobjectblock.tpl.php b/htdocs/don/tpl/linkedobjectblock.tpl.php index 0191fd89ee4..70373c58b28 100644 --- a/htdocs/don/tpl/linkedobjectblock.tpl.php +++ b/htdocs/don/tpl/linkedobjectblock.tpl.php @@ -33,8 +33,7 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("donations"); $total=0; $ilink=0; -foreach($linkedObjectBlock as $key => $objectlink) -{ +foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; $trclass='oddeven'; @@ -43,14 +42,14 @@ foreach($linkedObjectBlock as $key => $objectlink) - - - + + - + 1) - - - - - + + + + + '; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; $qtyProdCom=$line->qty; // Qty already shipped - print ' - "; + (".$value['nb'].") + "; } } } @@ -1326,7 +1326,7 @@ if ($action == 'create') $batchStock = + $dbatch->qty; // To get a numeric $deliverableQty = min($quantityToBeDelivered, $batchStock); print ''; - print ''; @@ -1357,7 +1357,7 @@ if ($action == 'create') else { print ''; - print ''; @@ -1397,7 +1397,7 @@ if ($action == 'create') $deliverableQty = max(0, $deliverableQty); // Quantity to send print ''; - print ' - "; + (".$value['nb'].") + "; print ""; } } @@ -1488,7 +1488,7 @@ if ($action == 'create') $batchStock = + $dbatch->qty; // To get a numeric $deliverableQty = min($quantityToBeDelivered, $batchStock); if ($deliverableQty < 0) $deliverableQty = 0; - print ''; @@ -1520,7 +1520,7 @@ if ($action == 'create') if ($subj == 0) // Line not shown yet, we show it { print ''; - print ''; - if ($action != 'editdate_livraison') print ''; + if ($action != 'editdate_livraison') print ''; print '
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").'
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").'
'.$year.''.$nbproduct.'
'.$year.''.$nbproduct.'
trans("Donation"); ?> getNomUrl(1); ?>ref_client; ?>date, 'day'); ?>ref_client; ?>date, 'day'); ?>total_ht; echo price($objectlink->total_ht); } ?> getLibStatut(3); ?>getLibStatut(3); ?>
trans("Total"); ?>
'.$langs->trans("Description").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("QtyToShip"); + print ''.$langs->trans("QtyOrdered").''.$langs->trans("QtyShipped").''.$langs->trans("QtyToShip"); if (empty($conf->productbatch->enabled)) { print '
('.$langs->trans("Fill").''; @@ -1197,13 +1197,13 @@ if ($action == 'create') } // Qty - print '
'.$line->qty; + print ''.$line->qty; print ''; print ''; + print ''; $quantityDelivered = $object->expeditions[$line->id]; print $quantityDelivered; print ''; @@ -1232,7 +1232,7 @@ if ($action == 'create') if (empty($conf->productbatch->enabled) || ! $product->hasbatch()) { // Quantity to send - print ''; + print ''; if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { if (GETPOST('qtyl'.$indiceAsked, 'int')) $deliverableQty=GETPOST('qtyl'.$indiceAsked, 'int'); @@ -1292,8 +1292,8 @@ if ($action == 'create') } print "
      -> ".$value['fullpath']." - (".$value['nb'].") ".$value['nb_total']."  ".$value['stock']." ".$img."
".$value['nb_total']."  ".$value['stock']." ".$img."
'; + print ''; print ''; print '
'; + print '
'; print ' '; print '
'; + print ''; if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print ''; @@ -1450,8 +1450,8 @@ if ($action == 'create') print '
'; print "      -> ".$value['fullpath']." - (".$value['nb'].") ".$value['nb_total']."  ".$value['stock']." ".$img." ".$value['nb_total']."  ".$value['stock']." ".$img."
'; + print '
'; print ''; print '
'; + print '
'; if ($line->product_type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $disabled=''; @@ -1782,7 +1782,7 @@ elseif ($id || $ref) print $langs->trans('DateDeliveryPlanned'); print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'
'; print '
'; if ($action == 'editdate_livraison') @@ -1921,7 +1921,7 @@ elseif ($id || $ref) print $langs->trans('SendingMethod'); print 'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).'
'; print '
'; if ($action == 'editshipping_method_id') @@ -1958,7 +1958,7 @@ elseif ($id || $ref) print '
'; print '
'; print $langs->trans('IncotermLabel'); - print ''; + print ''; if ($user->rights->expedition->creer) print ''.img_edit().''; else print ' '; print '
'; @@ -2003,22 +2003,22 @@ elseif ($id || $ref) // Adds a line numbering column if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print '
  '.$langs->trans("Products").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyOrdered").''.$langs->trans("QtyInOtherShipments").''.$langs->trans("QtyInOtherShipments").''; + print ''; if ($object->statut <= 1) { print $langs->trans("QtyToShip").' - '; @@ -2041,11 +2041,11 @@ elseif ($id || $ref) { if ($object->statut <= 1) { - print ''.$langs->trans("QtyToShip").''.$langs->trans("QtyToShip").''.$langs->trans("QtyShipped").''.$langs->trans("QtyShipped").''.$langs->trans("Batch").''.$langs->trans("CalculatedWeight").''.$langs->trans("CalculatedVolume").''.$langs->trans("Size").''.$langs->trans("CalculatedWeight").''.$langs->trans("CalculatedVolume").''.$langs->trans("Size").''.($i+1).''.($i+1).''.$lines[$i]->qty_asked.''.$lines[$i]->qty_asked.''; + print ''; foreach ($alreadysent as $key => $val) { if ($lines[$i]->fk_origin_line == $key) @@ -2223,7 +2223,7 @@ elseif ($id || $ref) if ($action == 'editline' && $lines[$i]->id == $line_id) { // edit mode - print ''; + print ''; if ($action != 'editshippingmethod' && $user->rights->expedition->creer) - print ''; + print ''; print '
'; if (is_array($lines[$i]->detail_batch) && count($lines[$i]->detail_batch) > 0) { print ''; @@ -2305,7 +2305,7 @@ elseif ($id || $ref) else { // Qty to ship or shipped - print ''; + print ''; // Warehouse source if (! empty($conf->stock->enabled)) @@ -2366,30 +2366,30 @@ elseif ($id || $ref) } // Weight - print ''; // Volume - print ''; // Size - //print ''; + //print ''; if ($action == 'editline' && $lines[$i]->id == $line_id) { - print ''; print ''; - print ''; print ''; @@ -219,7 +219,7 @@ if ( $resql ) print ''; - print ''; print ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index be7bcfa50ef..371be10adbd 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -338,7 +338,7 @@ if ($resql) // Thirdparty if (! empty($arrayfields['s.nom']['checked'])) { - print ''; } @@ -356,14 +356,14 @@ if ($resql) // Country if (! empty($arrayfields['country.code_iso']['checked'])) { - print ''; } // Company type if (! empty($arrayfields['typent.code']['checked'])) { - print ''; } @@ -406,19 +406,19 @@ if ($resql) // Status if (! empty($arrayfields['e.fk_statut']['checked'])) { - print ''; } // Status billed if (! empty($arrayfields['e.billed']['checked'])) { - print ''; } // Action column - print ''; @@ -427,15 +427,15 @@ if ($resql) print ''; if (! empty($arrayfields['e.ref']['checked'])) print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); if (! empty($arrayfields['e.ref_customer']['checked'])) print_liste_field_titre($arrayfields['e.ref_customer']['label'], $_SERVER["PHP_SELF"], "e.ref_customer", "", $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, 'align="left"', $sortfield, $sortorder); + if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder, 'left '); if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, 'align="center"', $sortfield, $sortorder); - if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, 'align="center"', $sortfield, $sortorder); - if (! empty($arrayfields['e.date_delivery']['checked'])) print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, 'align="center"', $sortfield, $sortorder); + if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); + if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center '); + if (! empty($arrayfields['e.date_delivery']['checked'])) print_liste_field_titre($arrayfields['e.date_delivery']['label'], $_SERVER["PHP_SELF"], "e.date_delivery", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['l.ref']['checked'])) print_liste_field_titre($arrayfields['l.ref']['label'], $_SERVER["PHP_SELF"], "l.ref", "", $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['l.date_delivery']['checked'])) print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $param, 'align="center"', $sortfield, $sortorder); + if (! empty($arrayfields['l.date_delivery']['checked'])) print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $param, '', $sortfield, $sortorder, 'center '); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -454,11 +454,11 @@ if ($resql) $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (! empty($arrayfields['e.datec']['checked'])) print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); - if (! empty($arrayfields['e.tms']['checked'])) print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); - if (! empty($arrayfields['e.fk_statut']['checked'])) print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder); - if (! empty($arrayfields['e.billed']['checked'])) print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); + if (! empty($arrayfields['e.datec']['checked'])) print_liste_field_titre($arrayfields['e.datec']['label'], $_SERVER["PHP_SELF"], "e.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + if (! empty($arrayfields['e.tms']['checked'])) print_liste_field_titre($arrayfields['e.tms']['label'], $_SERVER["PHP_SELF"], "e.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + if (! empty($arrayfields['e.fk_statut']['checked'])) print_liste_field_titre($arrayfields['e.fk_statut']['label'], $_SERVER["PHP_SELF"], "e.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['e.billed']['checked'])) print_liste_field_titre($arrayfields['e.billed']['label'], $_SERVER["PHP_SELF"], "e.billed", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; $i=0; @@ -528,7 +528,7 @@ if ($resql) // Country if (! empty($arrayfields['country.code_iso']['checked'])) { - print ''; @@ -537,7 +537,7 @@ if ($resql) // Type ent if (! empty($arrayfields['typent.code']['checked'])) { - print ''; @@ -547,7 +547,7 @@ if ($resql) // Date delivery planed if (! empty($arrayfields['e.date_delivery']['checked'])) { - print ''."\n"; } @@ -588,7 +588,7 @@ if ($resql) // Date creation if (! empty($arrayfields['e.datec']['checked'])) { - print ''; if (! $i) $totalarray['nbfield']++; @@ -596,7 +596,7 @@ if ($resql) // Date modification if (! empty($arrayfields['e.tms']['checked'])) { - print ''; if (! $i) $totalarray['nbfield']++; @@ -604,13 +604,13 @@ if ($resql) // Status if (! empty($arrayfields['e.fk_statut']['checked'])) { - print ''; + print ''; if (! $i) $totalarray['nbfield']++; } // Billed if (! empty($arrayfields['e.billed']['checked'])) { - print ''; + print ''; if (! $i) $totalarray['nbfield']++; } @@ -630,7 +630,7 @@ if ($resql) } else { - dol_print_error($db); + dol_print_error($db); } // End of page diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index 9da07ec45cd..50c67354dde 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -362,7 +362,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('DateDeliveryPlanned'); print ''; - if ($action != 'editdate_livraison') print ''; + if ($action != 'editdate_livraison') print ''; print '
'.$lines[$i]->qty_shipped.''.$lines[$i]->qty_shipped.''; + print ''; if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->weight_units, "weight"); else print ' '; print ''; + print ''; if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units, "volume"); else print ' '; print ''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").''.$lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units,"volume").''; + print ''; print '
'; print '
'; } elseif ($object->statut == 0) { // edit-delete buttons - print '
'; + print ''; print 'id . '">' . img_edit() . ''; print ''; diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 0c8f8717aea..462115f6cf7 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016 Laurent Destailleur +/* Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016 Laurent Destailleur * * 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 diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 41784fa57b5..bbb5ef58c36 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -160,7 +160,7 @@ if ($resql) print ''; print $companystatic->getNomUrl(1, 'customer', 32); print ''; + print ''; print $orderstatic->getLibStatut(3); print '
'; print $companystatic->getNomUrl(1, 'customer'); print ''; + print ''; print $orderstatic->getLibStatut(3); print '
'; + print ''; print ''; print ''; + print ''; print $form->select_country($search_country, 'search_country', '', 0, 'minwidth100imp maxwidth100'); print ''; + print ''; print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); print ''; + print ''; print $form->selectarray('viewstatut', array('0'=>$langs->trans('StatusSendingDraftShort'),'1'=>$langs->trans('StatusSendingValidatedShort'),'2'=>$langs->trans('StatusSendingProcessedShort')), $viewstatut, 1); print ''; + print ''; print $form->selectyesno('search_billed', $search_billed, 1, 0, 1); print ''; + print ''; $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
'; + print ''; $tmparray=getCountry($obj->fk_pays, 'all'); print $tmparray['label']; print ''; + print ''; if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1); print $typenArray[$obj->typent_code]; print ''; + print ''; print dol_print_date($db->jdate($obj->date_livraison), "day"); /*$now = time(); if ( ($now - $db->jdate($obj->date_expedition)) > $conf->warnings->lim && $obj->statutid == 1 ) @@ -573,7 +573,7 @@ if ($resql) if (! empty($arrayfields['l.date_delivery']['checked'])) { // Date received - print ''; + print ''; print dol_print_date($db->jdate($obj->date_reception), "day"); print ''; + print ''; print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); print ''; + print ''; print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); print ''.$shipment->LibStatut($obj->fk_statut, 5).''.$shipment->LibStatut($obj->fk_statut, 5).''.yn($obj->billed).''.yn($obj->billed).'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'
'; print '
'; if ($action == 'editdate_livraison') @@ -394,7 +394,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('SendingMethod'); print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'
'; print '
'; if ($action == 'editshippingmethod') { @@ -414,7 +414,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('Warehouse'); print 'id.'">'.img_edit($langs->trans('SetWarehouse'), 1).'id.'">'.img_edit($langs->trans('SetWarehouse'), 1).'
'; print ''; if ($action == 'editwarehouse') { @@ -433,7 +433,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('PaymentConditionsShort'); print ''; - if ($action != 'editconditions' && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).''; + if ($action != 'editconditions' && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).''; print ''; print ''; if ($action == 'editconditions') @@ -451,7 +451,7 @@ if ($id > 0 || ! empty($ref)) print ''; - if ($action != 'editmode' && ! empty($object->brouillon)) print ''; + if ($action != 'editmode' && ! empty($object->brouillon)) print ''; print '
'; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'),1).'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; print ''; if ($action == 'editmode') @@ -470,7 +470,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('AvailabilityPeriod'); print ''; if ($action != 'editavailability') - print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ''; print ''; print ''; if ($action == 'editavailability') { @@ -486,7 +486,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('Source'); print ''; if ($action != 'editdemandreason') - print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ''; print ''; print ''; if ($action == 'editdemandreason') { @@ -518,7 +518,7 @@ if ($id > 0 || ! empty($ref)) print ''; print '
'; print $langs->trans('IncotermLabel'); - print ''; + print ''; if ($user->rights->commande->creer) print ''.img_edit().''; else print ' '; print '
'; @@ -628,12 +628,12 @@ if ($id > 0 || ! empty($ref)) print ''; print ''.$langs->trans("Description").''; - print ''.$langs->trans("QtyOrdered").''; - print ''.$langs->trans("QtyShipped").''; - print ''.$langs->trans("KeepToShip").''; + print ''.$langs->trans("QtyOrdered").''; + print ''.$langs->trans("QtyShipped").''; + print ''.$langs->trans("KeepToShip").''; if (! empty($conf->stock->enabled)) { - print ''.$langs->trans("RealStock").''; + print ''.$langs->trans("RealStock").''; } else { @@ -730,18 +730,18 @@ if ($id > 0 || ! empty($ref)) } // Qty ordered - print '' . $objp->qty . ''; + print '' . $objp->qty . ''; // Qty already shipped $qtyProdCom=$objp->qty; - print ''; + print ''; // Nb of sending products for this line of order $qtyAlreadyShipped = (! empty($object->expeditions[$objp->rowid])?$object->expeditions[$objp->rowid]:0); print $qtyAlreadyShipped; print ''; // Qty remains to ship - print ''; + print ''; if ($type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $toBeShipped[$objp->fk_product] = $objp->qty - $qtyAlreadyShipped; @@ -763,7 +763,7 @@ if ($id > 0 || ! empty($ref)) if ($objp->fk_product > 0 && ($type == Product::TYPE_PRODUCT || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) && ! empty($conf->stock->enabled)) { - print ''; + print ''; print $product->stock_reel; if ($product->stock_reel < $toBeShipped[$objp->fk_product]) { @@ -797,10 +797,10 @@ if ($id > 0 || ! empty($ref)) $img=img_warning($langs->trans("StockTooLow")); } print '      -> '.$value['fullpath'].' ('.$value['nb'].')'; - print ' '.$value['nb_total'].''; + print ' '.$value['nb_total'].''; print ' '; print ' '; - print ''.$value['stock'].' '.$img.''."\n"; + print ''.$value['stock'].' '.$img.''."\n"; } } } @@ -892,7 +892,7 @@ if ($id > 0 || ! empty($ref)) } //print ''; } - //print ''; + //print ''; print ''; if ($toBeShippedTotal <= 0) { diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index 37f1b051760..c678c6d934d 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -253,7 +253,7 @@ print '
'; arsort($arrayyears); print $form->selectarray('year', $arrayyears, $year, 0); print ''; - print ''; + print ''; print ''; print ''; print '

'; @@ -263,10 +263,10 @@ print '
'; print '
'; print ''; print ''; -print ''; -print ''; -/*print ''; -print '';*/ +print ''; +print ''; +/*print ''; +print '';*/ print ''; $oldyear=0; @@ -279,22 +279,22 @@ foreach ($data as $val) print ''; - print ''; + print ''; - print ''; - /*print ''; - print '';*/ + print ''; + /*print ''; + print '';*/ print ''; } print ''; - print ''; - print ''; - /*print ''; - print '';*/ + print ''; + /*print ''; + print '';*/ print ''; $oldyear=$year; } @@ -307,7 +307,7 @@ print '
'; // Show graphs -print '
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").''.$langs->trans("Year").''.$langs->trans("NbOfSendings").''.$langs->trans("AmountTotal").''.$langs->trans("AmountAverage").'
'.$oldyear.''.$oldyear.'000000
'; + print ''; if ($year) print ''.$year.''; else print $langs->trans("ValidationDateNotDefinedEvenIfShipmentValidated"); print ''.$val['nb'].''.price(price2num($val['total'],'MT'),1).''.price(price2num($val['avg'],'MT'),1).''.$val['nb'].''.price(price2num($val['total'],'MT'),1).''.price(price2num($val['avg'],'MT'),1).'
'; +print ' - - + - - + 1) -{ +if (count($linkedObjectBlock) > 1) { ?> - - - - - + + + + + '.str_replace(',', ' , ', $filter['value']).''; } // suppression de l'export - print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; } @@ -751,7 +751,7 @@ if ($step == 3 && $datatoexport) print ''; print ''; //print ''; - //print ''; + //print ''; print ''; print ''; print ''; @@ -955,7 +955,7 @@ if ($step == 4 && $datatoexport) print ''; print ''; print ''; - print ''; + print ''; //print ''; //print ''; print ''; @@ -1007,9 +1007,9 @@ if ($step == 4 && $datatoexport) //print ' ('.$code.')'; print ''; - print ''; @@ -1060,7 +1060,7 @@ if ($step == 4 && $datatoexport) print ''; print ''; - print ''; @@ -1080,7 +1080,7 @@ if ($step == 4 && $datatoexport) $obj = $db->fetch_object($resql); print ''; $htmltabloflibs.= ''; - $htmltabloflibs.= ''; + $htmltabloflibs.= ''; $htmltabloflibs.= ''."\n"; } $htmltabloflibs.= '
'; if ($mesg) { print $mesg; } else { print $px1->show(); @@ -329,8 +329,8 @@ dol_fiche_end(); // TODO USe code similar to commande/stats/index.php instead of this one. /* print ''; -print ''; -print ''; +print ''; +print ''; $sql = "SELECT count(*) as nb, date_format(date_expedition,'%Y') as dm"; $sql.= " FROM ".MAIN_DB_PREFIX."expedition"; @@ -349,7 +349,7 @@ if ($resql) $nbproduct = $row[0]; $year = $row[1]; print ""; - print ''; + print ''; $i++; } } diff --git a/htdocs/expedition/stats/month.php b/htdocs/expedition/stats/month.php index 7f00effc574..5c448198980 100644 --- a/htdocs/expedition/stats/month.php +++ b/htdocs/expedition/stats/month.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2009 Laurent Destailleur +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004-2009 Laurent Destailleur * * 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 @@ -53,22 +53,21 @@ $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=expeditionstats&file=expediti $px = new DolGraph(); $mesg = $px->isGraphKo(); -if (! $mesg) -{ +if (! $mesg) { $px->SetData($data); $px->SetMaxValue($px->GetCeilMaxValue()); $px->SetWidth($WIDTH); $px->SetHeight($HEIGHT); - $px->SetYLabel($langs->trans("NbOfOrders")); + $px->SetYLabel($langs->trans("NbOfSendings")); $px->SetShading(3); - $px->SetHorizTickIncrement(1); - $px->SetPrecisionY(0); + $px->SetHorizTickIncrement(1); + $px->SetPrecisionY(0); $px->draw($filename, $fileurl); } print '
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").'
'.$langs->trans("Year").''.$langs->trans("NbOfSendings").'
'.$year.''.$nbproduct.'
'.$year.''.$nbproduct.'
'; -print ''; -print ''; +print ''; print '
Nombre d expedition par mois'; +print '
'.$langs->trans("NbOfSendingsByMonth").''; print $px->show(); print '
'; diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index f1eb3289b99..5bfc81c642a 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2014 Marcos García +/* Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Marcos García * * 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 @@ -49,14 +49,14 @@ foreach($linkedObjectBlock as $key => $objectlink)
trans("Shipment"); ?> getNomUrl(1); ?> date_delivery, 'day'); ?>date_delivery, 'day'); ?>rights->expedition->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?>getLibStatut(3); ?> + getLibStatut(3); ?> element != 'commande') { @@ -68,17 +68,16 @@ foreach($linkedObjectBlock as $key => $objectlink)
trans("Total"); ?>
'; + print ''; print 'rowid.'">'; print img_delete(); print ''; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index f872d230498..9663806fdc2 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -463,7 +463,7 @@ if ($step == 1 || ! $datatoexport) //print $value.'-'.$icon.'-'.$label."
"; print img_object($objexport->array_export_module[$key]->getName(), $icon).' '; print $label; - print '
'; + print ''; if ($objexport->array_export_perms[$key]) { print ''.img_picto($langs->trans("NewExport"), 'filenew').''; @@ -623,7 +623,7 @@ if ($step == 2 && $datatoexport) { // Selected fields print ' '.img_left('default', 0, 'style="max-width: 20px"').''.img_left('default', 0, 'style="max-width: 20px"').''; //print $text.'-'.$htmltext."
"; print $form->textwithpicto($text, $htmltext); @@ -638,7 +638,7 @@ if ($step == 2 && $datatoexport) print $form->textwithpicto($text, $htmltext); //print ' ('.$code.')'; print '
'.img_right('default', 0, 'style="max-width: 20px"').''.img_right('default', 0, 'style="max-width: 20px"').' 
'.$langs->trans("Entities").''.$langs->trans("ExportableFields").''.$langs->trans("ExportableFields").''.$langs->trans("FilteredFieldsValues").'
'.$langs->trans("Entities").''.$langs->trans("ExportedFields").''.$langs->trans("Position").''.$langs->trans("Position").' '.$langs->trans("FieldsTitle").'
'; + print ''; print $value.' '; - print ''; + print ''; if ($value < count($array_selected)) print ''.img_down().''; if ($value > 1) print ''.img_up().''; print '
'; + print ''; print ''; print '
'; print $obj->label; - print ''; + print ''; print 'rowid.'">'; print img_delete(); print ''; @@ -1231,7 +1231,7 @@ if ($step == 5 && $datatoexport) $label=$listeall[$key]; $htmltabloflibs.= $form->textwithpicto($label, $text).''.$objmodelexport->getLibLabelForKey($key).''.$objmodelexport->getLibVersionForKey($key).''.$objmodelexport->getLibVersionForKey($key).'
'; diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index f84f7bb8418..98b1f4552a0 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -71,7 +71,7 @@ print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; @@ -91,7 +91,7 @@ foreach($liste as $key => $val) $label=$liste[$key]; print ''; print ''; - print ''; + print ''; print ''; } diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 7e802762a09..ff344c45809 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011 Juanjo Menent +/* Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2011 Juanjo Menent * * 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 @@ -117,7 +117,7 @@ if (GETPOST('delete', 'alpha')) if ($result3) $result4=dolibarr_del_const($db, "FTP_PASSWORD_" . $entry, $conf->entity); if ($result4) $result5=dolibarr_del_const($db, "FTP_NAME_" . $entry, $conf->entity); if ($result4) $result6=dolibarr_del_const($db, "FTP_PASSIVE_" . $entry, $conf->entity); - + if ($result1 && $result2 && $result3 && $result4 && $result5 && $result6) { $db->commit(); @@ -199,9 +199,9 @@ else print ''; print ''; print ''; - + print '
'.$langs->trans("AvailableFormats").''.$langs->trans("LibraryShort").''.$langs->trans("LibraryVersion").''.$langs->trans("LibraryVersion").'
'.$form->textwithpicto($label, $text).''.$model->getLibLabelForKey($key).''.$model->getLibVersionForKey($key).''.$model->getLibVersionForKey($key).'
'.$form->selectyesno('FTP_PASSIVE_'.($lastftpentry+1), $defaultpassive, 2).''.$langs->trans("No").'
'; - + ?>
">
@@ -236,7 +236,7 @@ else print "
"; print ''; print ''; - + print ''."\n"; print ''; @@ -250,44 +250,44 @@ else $keyforuser="FTP_USER_" . $idrss; $keyforpassword="FTP_PASSWORD_" . $idrss; $keyforpassive="FTP_PASSIVE_" . $idrss; - + print ''; print ""; print ""; print ""; - + print ''; print ""; print ""; print ""; - + print ''; print ""; print ""; print ""; - + print ''; print ""; print ""; print ""; - + print ''; print ""; print ""; print ""; - + print ''; print ""; print ''; print ""; print ""; - print ""; print '
".$langs->trans("Name")."global->$keyforname . "\" size=\"64\">
".$langs->trans("Server")."global->$keyforserver . "\" size=\"64\">
".$langs->trans("Port")."global->$keyforport . "\" size=\"64\">
".$langs->trans("User")."global->$keyforuser . "\" size=\"24\">
".$langs->trans("Password")."global->$keyforpassword . "\" size=\"24\">
".$langs->trans("FTPPassiveMode")."'.$form->selectyesno('FTP_PASSIVE_'.$idrss, $conf->global->$keyforpassive, 1).'
"; + print ""; print "trans("Modify")."\">"; print "   "; print "trans("Delete")."\">"; @@ -295,10 +295,10 @@ else print "
'; - + print "
"; print '
'; - + $i++; } } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index a543066a670..07af448aedd 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -1,6 +1,7 @@ - * Copyright (C) 2008-2009 Regis Houssin +/* Copyright (C) 2008-2016 Laurent Destailleur + * Copyright (C) 2008-2009 Regis Houssin + * Copyright (C) 2019 Frédéric 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 @@ -17,9 +18,9 @@ */ /** - * \file htdocs/ftp/index.php - * \ingroup ftp - * \brief Main page for FTP section area + * \file htdocs/ftp/index.php + * \ingroup ftp + * \brief Main page for FTP section area */ require '../main.inc.php'; @@ -453,13 +454,13 @@ else print ''."\n"; print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; @@ -558,28 +559,28 @@ else if ($is_directory) print ''; print ''; // Size - print ''; // Date - print ''; // User - print ''; // Group - print ''; // Permissions - print ''; // Action - print ''; // Action column - print ''; @@ -286,7 +286,7 @@ else foreach($typeleaves as $key => $val) { $labeltype = ($langs->trans($val['code'])!=$val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']); - print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', 'align="center"'); + print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center '); } } else diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 452762f6e65..2a77c9e1068 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -374,7 +374,7 @@ print ''; +print ''; @@ -394,14 +394,14 @@ if ($id && ! GETPOSTISSET('search_employee')) if (! empty($user->rights->holiday->read_all)) // Can see all { if (GETPOSTISSET('search_employee')) $search_employee=GETPOST('search_employee', 'int'); - print ''; } else { if (GETPOSTISSET('search_employee')) $search_employee=GETPOST('search_employee', 'int'); - print ''; } @@ -409,7 +409,7 @@ else // Approve if ($user->rights->holiday->read_all) { - print ''; print ''; // Start date -print ''; // End date -print ''; // Status -print ''; // Actions -print ''; @@ -471,32 +471,31 @@ print "\n"; print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "cp.ref", "", $param, '', $sortfield, $sortorder); -print_liste_field_titre("DateCreateCP", $_SERVER["PHP_SELF"], "cp.date_create", "", $param, 'align="center"', $sortfield, $sortorder); +print_liste_field_titre("DateCreateCP", $_SERVER["PHP_SELF"], "cp.date_create", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "cp.fk_user", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("ValidatorCP", $_SERVER["PHP_SELF"], "cp.fk_validator", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Type", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); -print_liste_field_titre("NbUseDaysCPShort", $_SERVER["PHP_SELF"], '', '', $pram, 'align="right"', $sortfield, $sortorder); -print_liste_field_titre("DateDebCP", $_SERVER["PHP_SELF"], "cp.date_debut", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("DateFinCP", $_SERVER["PHP_SELF"], "cp.date_fin", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, 'align="right"', $sortfield, $sortorder); -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', $param, 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; +print_liste_field_titre("NbUseDaysCPShort", $_SERVER["PHP_SELF"], '', '', $pram, '', $sortfield, $sortorder, 'right '); +print_liste_field_titre("DateDebCP", $_SERVER["PHP_SELF"], "cp.date_debut", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("DateFinCP", $_SERVER["PHP_SELF"], "cp.date_fin", "", $param, '', $sortfield, $sortorder, 'center '); +print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right '); +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print "\n"; $listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon")); // If we ask a dedicated card and not allow to see it, we forc on user. -if ($id && empty($user->rights->holiday->read_all) && ! in_array($id, $childids)) -{ +if ($id && empty($user->rights->holiday->read_all) && ! in_array($id, $childids)) { $langs->load("errors"); print ''; $result = 0; } -// Lines elseif (! empty($holiday->holiday) && !empty($mysoc->country_id)) { - $userstatic = new User($db); - $approbatorstatic = new User($db); + // Lines + $userstatic = new User($db); + $approbatorstatic = new User($db); $typeleaves=$holiday->getTypes(1, -1); @@ -538,22 +537,22 @@ elseif (! empty($holiday->holiday) && !empty($mysoc->country_id)) $labeltypeleavetoshow = ($langs->trans($typeleaves[$infos_CP['fk_type']]['code'])!=$typeleaves[$infos_CP['fk_type']]['code'] ? $langs->trans($typeleaves[$infos_CP['fk_type']]['code']) : $typeleaves[$infos_CP['fk_type']]['label']); print empty($typeleaves[$infos_CP['fk_type']]['label']) ? $langs->trans("TypeWasDisabledOrRemoved", $infos_CP['fk_type']) : $labeltypeleavetoshow; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; // Action column - print ''; print ''; print ''; print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; print ''; print ''; @@ -173,20 +173,20 @@ else print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; - print ''; - print ''; + print ''; print ''; print ''; } diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index d64d85813e6..f27f1a5f10b 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -193,7 +193,7 @@ print ''; print ''; print ''; // Action column -print ''; @@ -201,15 +201,15 @@ print ''; print ''; print_liste_field_titre('ID'); -print_liste_field_titre('Date', $_SERVER["PHP_SELF"], '', '', '', 'align="center"'); +print_liste_field_titre('Date', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center '); print_liste_field_titre('ActionByCP'); print_liste_field_titre('UserUpdateCP'); print_liste_field_titre('Description'); print_liste_field_titre('Type'); -print_liste_field_titre('PrevSoldeCP', $_SERVER["PHP_SELF"], '', '', '', 'align="right"'); -print_liste_field_titre('Variation', $_SERVER["PHP_SELF"], '', '', '', 'align="right"'); -print_liste_field_titre('NewSoldeCP', $_SERVER["PHP_SELF"], '', '', '', 'align="right"'); -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; +print_liste_field_titre('PrevSoldeCP', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'right '); +print_liste_field_titre('Variation', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'right '); +print_liste_field_titre('NewSoldeCP', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'right '); +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print ''; diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 1985926563b..5e6413abb45 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -95,7 +95,7 @@ if ($result) print_liste_field_titre("Address", $_SERVER["PHP_SELF"], "e.address", "", "", "", $sortfield, $sortorder); print_liste_field_titre("Zipcode", $_SERVER["PHP_SELF"], "e.zip", "", "", "", $sortfield, $sortorder); print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "e.town", "", "", "", $sortfield, $sortorder); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.status", "", "", 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.status", "", "", '', $sortfield, $sortorder, 'right '); print "\n"; if ($num > 0) @@ -117,7 +117,7 @@ if ($result) print ''; print ''; - print ''; print "\n"; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 6aa17362894..3751935b81c 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -198,7 +198,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; if ($num) @@ -228,7 +228,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) print ''; + print ''; print ''; print ''; @@ -271,8 +271,8 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) print '
'.$langs->trans("Content").''.$langs->trans("Size").''.$langs->trans("Date").''.$langs->trans("Owner").''.$langs->trans("Group").''.$langs->trans("Permissions").''; + print ''.$langs->trans("Content").''.$langs->trans("Size").''.$langs->trans("Date").''.$langs->trans("Owner").''.$langs->trans("Group").''.$langs->trans("Permissions").''; if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").' '; print ''.img_picto($langs->trans("Refresh"), 'refresh').' '; print ''; + print ''; if (! $is_directory && ! $is_link) print $vals[4]; else print ' '; print ''; + print ''; print $vals[5].' '.$vals[6].' '.$vals[7]; print ''; + print ''; print $vals[2]; print ''; + print ''; print $vals[3]; print ''; + print ''; print $vals[0]; print ''; + print ''; if ($is_directory) { if ($file != '..') print ''.img_delete().''; @@ -628,7 +629,7 @@ else */ print '
'; - print '
'; + print '
'; print ''; print '
'; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index e3b31ec7726..9bc181f66d9 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1326,7 +1326,7 @@ else if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) { - print '
'; + print '
'; if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) { print ''; diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 82b44dd9bca..1404391f521 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -271,7 +271,7 @@ else print '
'; + print ''; $searchpicto=$form->showFilterButtons(); print $searchpicto; print ''; print ''; $formother->select_year($search_year_create, 'search_year_create', 1, $min_year, 0); print ''; + print ''; print $form->select_dolusers($search_employee, "search_employee", 1, "", $disabled, '', '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); print ''; + print ''; print $form->select_dolusers($search_employee, "search_employee", 1, "", $disabled, 'hierarchyme', '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); print ''; + print ''; $validator = new UserGroup($db); $excludefilter=$user->admin?'':'u.rowid <> '.$user->id; @@ -445,24 +445,24 @@ print ' '; +print ''; print ''; $formother->select_year($search_year_start, 'search_year_start', 1, $min_year, $max_year); print ''; +print ''; print ''; $formother->select_year($search_year_end, 'search_year_end', 1, $min_year, $max_year); print ''; +print ''; $holiday->selectStatutCP($search_statut, 'search_statut'); print ''; +print ''; $searchpicto=$form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
'.$langs->trans("NotEnoughPermissions").'
'; + print ''; $nbopenedday=num_open_day($infos_CP['date_debut_gmt'], $infos_CP['date_fin_gmt'], 0, 1, $infos_CP['halfday']); print $nbopenedday.' '.$langs->trans('DurationDays'); print ''; + print ''; print dol_print_date($infos_CP['date_debut'], 'day'); print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; print ''; + print ''; print dol_print_date($infos_CP['date_fin'], 'day'); print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; print ''.$holidaystatic->LibStatut($infos_CP['statut'], 5).''.$holidaystatic->LibStatut($infos_CP['statut'], 5).''; + print ''; if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected=0; diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 4cfa375fe76..98db1318aa7 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -1,7 +1,7 @@ - * Copyright (C) 2011 François Legastelois - * Copyright (C) 2018 Frédéric France +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2011 François Legastelois + * Copyright (C) 2018-2019 Frédéric 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 @@ -110,12 +110,12 @@ print '
' . $langs->trans('Ref') . '' . $langs->trans('Employee') . '' . $langs->trans('Type') . '' . $langs->trans('DateDebCP') . '' . $langs->trans('DateFinCP') . '' . $langs->trans('NbUseDaysCPShort') . '' . $langs->trans('DateStartInMonth') . '' . $langs->trans('DateEndInMonth') . '' . $langs->trans('NbUseDaysCPShortInMonth') . '' . $langs->trans('DateDebCP') . '' . $langs->trans('DateFinCP') . '' . $langs->trans('NbUseDaysCPShort') . '' . $langs->trans('DateStartInMonth') . '' . $langs->trans('DateEndInMonth') . '' . $langs->trans('NbUseDaysCPShortInMonth') . '' . $langs->trans('DescCP') . '
' . $user->getFullName($langs) . '' . $obj->label . '' . dol_print_date($obj->date_debut, 'day'); + print '' . dol_print_date($obj->date_debut, 'day'); print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; print '' . dol_print_date($obj->date_fin, 'day'); + print '' . dol_print_date($obj->date_fin, 'day'); print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; print '' . num_open_day($date_start, $date_end, 0, 1, $obj->halfday) . '' . dol_print_date($date_start_inmonth, 'day'); + print '' . num_open_day($date_start, $date_end, 0, 1, $obj->halfday) . '' . dol_print_date($date_start_inmonth, 'day'); print ' ('.$langs->trans($listhalfday[$starthalfdayinmonth]).')'; print '' . dol_print_date($date_end_inmonth, 'day'); + print '' . dol_print_date($date_end_inmonth, 'day'); print ' ('.$langs->trans($listhalfday[$endhalfdayinmonth]).')'; print '' . num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth) . '' . num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth) . '' . dol_escape_htmltag(dolGetFirstLineOfText($obj->description)) . '
'; +print ''; $searchpicto=$form->showFilterButtons(); print $searchpicto; print '
'.$obj->zip.''.$obj->town.''; + print ''; print $establishmentstatic->getLibStatut(5); print '
'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num)).''.$langs->trans("from").''.$langs->trans("to").''.$langs->trans("DateModificationShort").''.$langs->trans("DateModificationShort").' 
'.dol_print_date($obj->date_start, 'day').' '.$langs->trans($listhalfday[$starthalfday]); print ''.dol_print_date($obj->date_end, 'day').' '.$langs->trans($listhalfday[$endhalfday]); - print ''.dol_print_date($db->jdate($obj->dm), 'day').''.dol_print_date($db->jdate($obj->dm), 'day').''.$holidaystatic->LibStatut($obj->status, 3).'
'; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; if ($num) @@ -299,8 +299,8 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; @@ -343,8 +343,8 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire print '
'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''.$langs->trans("FeesKilometersOrAmout").''.$langs->trans("DateModificationShort").''.$langs->trans("FeesKilometersOrAmout").''.$langs->trans("DateModificationShort").' 
'.$deplacementstatic->getNomUrl(1).''.$userstatic->getNomUrl(-1).''.$obj->km.''.dol_print_date($db->jdate($obj->dm), 'day').''.$obj->km.''.dol_print_date($db->jdate($obj->dm), 'day').''.$deplacementstatic->LibStatut($obj->fk_statut, 3).'
'; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; if ($num) @@ -371,8 +371,8 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire print ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; diff --git a/htdocs/ifttt/admin/index.php b/htdocs/ifttt/admin/index.php index d6eb777109b..de3abbe3c2a 100644 --- a/htdocs/ifttt/admin/index.php +++ b/htdocs/ifttt/admin/index.php @@ -72,7 +72,7 @@ print '
'.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''.$langs->trans("TotalTTC").''.$langs->trans("DateModificationShort").''.$langs->trans("TotalTTC").''.$langs->trans("DateModificationShort").' 
'.$expensereportstatic->getNomUrl(1).''.$userstatic->getNomUrl(-1).''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->dm), 'day').''.price($obj->total_ttc).''.dol_print_date($db->jdate($obj->dm), 'day').''.$expensereportstatic->LibStatut($obj->status, 3).'
'; print ''; print ""; -print '"; +print '"; print ""; print ""; @@ -81,13 +81,13 @@ print ''; $production_mode=(empty($conf->global->IFTTT_PRODUCTION_MODE)?false:true); if ($production_mode) { - print ''; } else { - print ''; } diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index f877c193750..4b6a511d0e5 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -242,3 +242,6 @@ ALTER TABLE llx_facturedet_rec ADD COLUMN fk_user_modif integer; ALTER TABLE llx_expensereport_det MODIFY COLUMN value_unit double(24,8) NOT NULL; ALTER TABLE llx_expensereport_det ADD COLUMN subprice double(24,8) DEFAULT 0 NOT NULL after qty; +ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_parent (fk_product_parent); +ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_child (fk_product_child); + diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 51a5d7c72d0..881af96fe26 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4792,7 +4792,7 @@ class Product extends CommonObject * * @param Product $object Object product or service * @param string $type Barcode type (ean, isbn, ...) - * @return void + * @return string */ public function get_barcode($object, $type = '') {
".$langs->trans("Parameter")."'.$langs->trans("Value")."'.$langs->trans("Value")." 
'.$langs->trans("ProductionMode").''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print '