diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 85562ebc268..4de2be6fcbb 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -296,23 +296,24 @@ if ($action != 'export_csv') } print ''; - if(!empty($show_subgroup)) + if (!empty($show_subgroup)) { - // Permet d'afficher le compte comptable + // Show accounting account if (empty($displayed_account) || $root_account_description != $displayed_account) { - // Affiche un Sous-Total par compte comptable + // Show subtotal per accounting account if ($displayed_account != "") { - print '' . $langs->trans("SubTotal") . ':'; - print '' . price($sous_total_debit) . ''; - print '' . price($sous_total_credit) . ''; - print '' . price(price2num($sous_total_credit - $sous_total_debit)) . ''; + print ''; + print ''.$langs->trans("SubTotal").':'; + print ''.price($sous_total_debit).''; + print ''.price($sous_total_credit).''; + print ''.price(price2num($sous_total_credit - $sous_total_debit)).''; print "\n"; print ''; } // Show first line of a break print ''; - print '' . $line->numero_compte . ($root_account_description ? ' - ' . $root_account_description : '') . ''; + print ''.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').''; print ''; $displayed_account = $root_account_description; @@ -337,9 +338,9 @@ if ($action != 'export_csv') $sous_total_credit += $line->credit; } - if(!empty($show_subgroup)) + if (!empty($show_subgroup)) { - print '' . $langs->trans("SubTotal") . ':' . price($sous_total_debit) . '' . price($sous_total_credit) . '' . price(price2num($sous_total_debit - $sous_total_credit)) . ''; + print ''.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).''; print "\n"; print ''; } diff --git a/htdocs/cache.manifest b/htdocs/cache.manifest index ebbf1aab4eb..5e514a32a47 100644 --- a/htdocs/cache.manifest +++ b/htdocs/cache.manifest @@ -8,7 +8,7 @@ CACHE MANIFEST # Files listed under CACHE will be ALWAYS cached after they are loaded. # And they will be always used from Cache after (even after refresh). CACHE: -theme/dolibarr_logo.png +theme/dolibarr_logo.svg support/ support/index.php diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index f9bc453d999..faf2feeb7a0 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -672,27 +672,27 @@ if (!empty($date_start) && !empty($date_stop)) } elseif ($data['item'] == 'ExpenseReport') { $expensereport->id = $data['id']; $expensereport->ref = $data['ref']; - print $expensereport->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $expensereport->getNomUrl(1, 0, 0, '', 0, 0); } elseif ($data['item'] == 'SalaryPayment') { $salary_payment->id = $data['id']; $salary_payment->ref = $data['ref']; - print $salary_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $salary_payment->getNomUrl(1, '', 0, '', 0); } elseif ($data['item'] == 'Donation') { $don->id = $data['id']; $don->ref = $data['ref']; - print $don->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $don->getNomUrl(1, 0, '', 0); } elseif ($data['item'] == 'SocialContributions') { $charge_sociales->id = $data['id']; $charge_sociales->ref = $data['ref']; - print $charge_sociales->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $charge_sociales->getNomUrl(1, 0, 0, 0, 0); } elseif ($data['item'] == 'VariousPayment') { $various_payment->id = $data['id']; $various_payment->ref = $data['ref']; - print $various_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $various_payment->getNomUrl(1, '', 0, 0); } elseif ($data['item'] == 'LoanPayment') { $payment_loan->id = $data['id']; $payment_loan->ref = $data['ref']; - print $payment_loan->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $payment_loan->getNomUrl(1, 0, 0, '', 0); } else { print $data['ref']; } @@ -712,11 +712,11 @@ if (!empty($date_start) && !empty($date_stop)) print ''.$data['paid'].''; // Total ET - print ''.price($data['sens']?$data['amount_ht']:-$data['amount_ht'])."\n"; + print ''.price($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'])."\n"; // Total IT - print ''.price($data['sens']?$data['amount_ttc']:-$data['amount_ttc'])."\n"; + print ''.price($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'])."\n"; // Total VAT - print ''.price($data['sens']?$data['amount_vat']:-$data['amount_vat'])."\n"; + print ''.price($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'])."\n"; print ''.$data['thirdparty_name']."\n"; @@ -758,9 +758,9 @@ if (!empty($date_start) && !empty($date_stop)) // Balance print ''; print ''.$langs->trans('Total').''; - print ''.price(price2num($totalET_credit+$totalET_debit, 'MT')).''; - print ''.price(price2num($totalIT_credit+$totalIT_debit, 'MT')).''; - print ''.price(price2num($totalVAT_credit+$totalVAT_debit, 'MT')).''; + print ''.price(price2num($totalET_credit + $totalET_debit, 'MT')).''; + print ''.price(price2num($totalIT_credit + $totalIT_debit, 'MT')).''; + print ''.price(price2num($totalVAT_credit + $totalVAT_debit, 'MT')).''; print ''; print "\n"; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d6a4c437c50..95ed7e26a13 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -665,16 +665,18 @@ class Form * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. * @param int $alwaysvisible 1=select button always visible + * @param string $name Name for massaction + * @param string $cssclass CSS class used to check for select * @return string|void Select list */ - public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0) + public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect') { global $conf, $langs, $hookmanager; $disabled = 0; $ret = '
'; - $ret .= ''; // Complete list with data from external modules. THe module can use $_SERVER['PHP_SELF'] to know on which page we are, or use the $parameters['currentcontext'] completed by executeHooks. $parameters = array(); @@ -693,46 +695,46 @@ class Form $ret .= ''; - if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.massactionselect'); + if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.' . $name . 'select'); // Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button $ret .= ''; // Hidden button BEFORE so it is the one used when we submit with ENTER. - $ret .= ''; + $ret .= ''; $ret .= '
'; if (!empty($conf->use_javascript_ajax)) { $ret .= ' '; print '
'; } if (empty($conf->global->PROJECT_HIDE_TASKS)) @@ -591,7 +604,7 @@ if ($action == 'create' && $user->rights->projet->creer) print ''; $filteronlist = ''; if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; - $text = $form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300'); + $text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusx'); if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) { $texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty"); @@ -632,27 +645,27 @@ if ($action == 'create' && $user->rights->projet->creer) if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Opportunity status - print ''.$langs->trans("OpportunityStatus").''; + print ''.$langs->trans("OpportunityStatus").''; print ''; print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status') ?GETPOST('opp_status') : $object->opp_status); print ''; // Opportunity probability - print ''.$langs->trans("OpportunityProbability").''; - print ' %'; - print ''; + print ''.$langs->trans("OpportunityProbability").''; + print ' %'; + print ''; print ''; print ''; // Opportunity amount - print ''.$langs->trans("OpportunityAmount").''; - print ''; + print ''.$langs->trans("OpportunityAmount").''; + print ''; print ''; } // Budget print ''.$langs->trans("Budget").''; - print ''; + print ''; print ''; // Description @@ -667,7 +680,7 @@ if ($action == 'create' && $user->rights->projet->creer) print ''.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1); $arrayselected = GETPOST('categories', 'array'); - print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print ""; } @@ -833,9 +846,22 @@ elseif ($object->id > 0) print ''; if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { - print 'usage_opportunity ? ' checked="checked"' : '')).'"> '; + print 'usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); + print ''; print '
'; } if (empty($conf->global->PROJECT_HIDE_TASKS)) @@ -884,8 +910,9 @@ elseif ($object->id > 0) if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + $classfortr = ($object->usage_opportunity ? '' : ' hideobject'); // Opportunity status - print ''.$langs->trans("OpportunityStatus").''; + print ''.$langs->trans("OpportunityStatus").''; print ''; print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'inline-block valignmiddle'); print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 83e757b78f8..2378728a8d3 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -191,7 +191,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index ddd1943329e..ea7fd71c9e6 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -793,7 +793,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 2610219d69d..a3f6d733fcb 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -245,7 +245,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 6b7805cf473..b1d6c149a51 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -181,7 +181,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print '
'.$langs->trans("PoweredBy").'
'; + print '
'.$langs->trans("PoweredBy").'
'; } print ''; } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 195d4df88bb..96a9dd7deed 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1331,7 +1331,7 @@ else // Country print ''.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).''; print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country((GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id)); + print $form->select_country((GETPOST('country_id') != '' ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; @@ -1354,16 +1354,16 @@ else // Phone / Fax print ''.$form->editfieldkey('Phone', 'phone', '', $object, 0).''; - print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning').' '; + print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning').' '; if ($conf->browser->layout == 'phone') print ''; print ''.$form->editfieldkey('Fax', 'fax', '', $object, 0).''; - print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax').' '; + print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax').' '; // Email / Web print ''.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).''; - print ''.img_picto('', 'object_email').' '; + print ''.img_picto('', 'object_email').' '; print ''.$form->editfieldkey('Web', 'url', '', $object, 0).''; - print ''.img_picto('', 'globe').' '; + print ''.img_picto('', 'globe').' '; if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1380,42 +1380,6 @@ else } } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''.$form->editfieldkey('Skype', 'skype', '', $object, 0).''; - // print ''; - // print 'skype).'">'; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).''; - // print ''; - // print 'twitter).'">'; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).''; - // print ''; - // print 'facebook).'">'; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).''; - // print ''; - // print 'linkedin).'">'; - // print ''; - // } - // } - // Prof ids $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); while ($i <= 6) @@ -1432,7 +1396,7 @@ else print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); print ''; - if (($j % 2) == 1) print ''; + if (($j % $NBCOLS) == ($NBCOLS - 1)) print ''; $j++; } $i++; @@ -1481,9 +1445,11 @@ else //TODO: Place into a function to control showing by country or study better option if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { - print ''.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; + print ''.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); - print ''.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; + print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); print ''; } @@ -1883,6 +1849,7 @@ else print ''; print $formcompany->selectProspectCustomerType($object->client); print ''; + if ($conf->browser->layout == 'phone') print ''; print ''.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).''; print ''; - print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; print ''; + print '
'; @@ -1914,15 +1881,18 @@ else || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { print '
'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).''; + print ''.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).''; print $form->selectyesno("fournisseur", $object->fournisseur, 1); print '
'; if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) { print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0); } - print ''; + print ''; print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''; @@ -1979,7 +1951,7 @@ else // Country print ''; @@ -2001,15 +1973,16 @@ else // Phone / Fax print ''; - print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; print ''; - print ''; + print ''; // EMail / Web print ''; - print ''; + print ''; print ''; - print ''; + print ''; if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -2025,36 +1998,9 @@ else } } } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''; - // print ''; - // } - // } // Prof ids - $i = 1; $j = 0; + $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); while ($i <= 6) { $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); @@ -2062,13 +2008,13 @@ else { $key = 'idprof'.$i; - if (($j % 2) == 0) print ''; + if (($j % $NBCOLS) == 0) print ''; $idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY'; print ''; - if (($j % 2) == 1) print ''; + if (($j % $NBCOLS) == ($NBCOLS - 1)) print ''; $j++; } $i++; @@ -2093,7 +2039,7 @@ else print ''; } print ''; - + if ($conf->browser->layout == 'phone') print ''; print ''; + if ($conf->browser->layout == 'phone') print ''; print '
'; if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { @@ -1971,7 +1941,9 @@ else // Zip / Town print '
'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).''; print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth50onsmartphone'); - print ''.$form->editfieldkey('Town', 'town', '', $object, 0).''; + print '
'.$form->editfieldkey('Town', 'town', '', $object, 0).''; print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); print '
'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).''; print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id'); + print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
'.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).''.img_picto('', 'object_phoning').' '.img_picto('', 'object_phoning').'
'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).''.img_picto('', 'object_phoning_fax').'
'.img_picto('', 'object_phoning_fax').'
'.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).''.img_picto('', 'object_email').'
'.img_picto('', 'object_email').'
'.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).''.img_picto('', 'globe').'
'.img_picto('', 'globe').'
'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'
'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'
'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'
'.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).'
'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).''; print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); print '
'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).''; print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1); if (!isOnlyOneLocalTax(2)) @@ -2167,6 +2113,7 @@ else print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
'.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).''; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 91f24bbb915..91d0fe9bb1a 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -34,7 +34,6 @@ $WS_DOL_URL_WSDL = 'https://ec.europa.eu/taxation_customs/vies/checkVatService.w $WS_METHOD = 'checkVat'; - $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index a5686054193..e668b01aacb 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -25,7 +25,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -require '../../main.inc.php'; // Load $user and permissions +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../../main.inc.php'; // Load $user and permissions $id = GETPOST('id', 'int'); $w = GETPOST('w', 'int'); @@ -72,12 +72,12 @@ elseif ($query == "pro") $objProd = new Product($db); $objProd->fetch($id); - $image = $objProd->show_photos('product', $conf->product->multidir_output[$entity], 'small', 1); + $image = $objProd->show_photos('product', $conf->product->multidir_output[$objProd->entity], 'small', 1); preg_match('@src="([^"]+)"@', $image, $match); $file = array_pop($match); if ($file == "") header('Location: ../../public/theme/common/nophoto.png'); - else header('Location: '.$file.'&cache=1'); + else header('Location: '.$file.'&cache=1&publictakepos=1&modulepart=product'); } else { diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 3d6cec96319..16012022dc9 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -625,7 +625,7 @@ $(document).ready(function() { else selectedline=this.id; selectedtext=$('#'+selectedline).find("td:first").html(); '; -if ($action=="productinfo"){ +if ($action == "productinfo") { $prod = new Product($db); $prod->fetch($idproduct); print "".$prod->label."
"; - print ''; + print ''; print "
".$prod->description; print "
".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
'; print ''; } -elseif ($action=="editline"){ +elseif ($action == "editline") { $placeid = GETPOST('placeid', 'int'); $selectedline = GETPOST('selectedline', 'int'); $invoice = new Facture($db); @@ -95,12 +95,12 @@ elseif ($action=="editline"){ $prod = new Product($db); $prod->fetch($line->fk_product); print "".$prod->label."
"; - print ''; + print ''; print "
".$prod->description; print "
".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
'; - print ''; - print ''; + print ''; + print ''; print ''; } } @@ -168,11 +168,11 @@ $( document ).ready(function() { function LoadPlace(placeid){ place=placeid; @@ -197,11 +197,11 @@ function AddProduct(placeid, productid){ function AddProductConfirm(placeid, productid){ place=placeid;
'.strtoupper(substr($langs->trans('Floors'), 0, 3)).''; print ''; print ''; print ''; } - else{ + else { print ''; print ''; print ''; diff --git a/htdocs/takepos/public/auto_order.php b/htdocs/takepos/public/auto_order.php index c7612711df0..910c00327b4 100644 --- a/htdocs/takepos/public/auto_order.php +++ b/htdocs/takepos/public/auto_order.php @@ -33,4 +33,5 @@ $_SESSION["takeposterminal"] = 1; define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1); if (GETPOSTISSET("mobilepage")) require '../invoice.php'; +elseif (GETPOSTISSET("genimg")) require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php'; else require '../phone.php'; diff --git a/htdocs/theme/dolibarr_logo.png b/htdocs/theme/dolibarr_logo.png index 77c21461910..c15f03c821b 100644 Binary files a/htdocs/theme/dolibarr_logo.png and b/htdocs/theme/dolibarr_logo.png differ diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index afb154408c5..3e213c3d8e2 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -17,6 +17,7 @@ --colorbacklinepair2: rgb(); --colorbacklinepairhover: rgb(); --colorbacklinepairchecked: rgb(); + --colorbacklinebreak: rgb(); --colorbackbody: rgb(); --colortexttitlenotab: rgb(); --colortexttitle: rgb(); @@ -3289,7 +3290,7 @@ td.evenodd, tr.nohoverpair td, #trlinefordates td { .trforbreak td { font-weight: 500; border-bottom: 1pt solid black !important; - /* background-color: # !important; */ + background-color: var(--colorbacklinebreak) !important; !important; } .trforbreak.nobold td a, .trforbreak.nobold span.secondary { font-weight: normal !important; diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 823b8168b4c..d2a11725ecf 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -65,7 +65,7 @@ $colorbacklinepair1 = '251,251,251'; // line pair $colorbacklinepair2 = '251,251,251'; // line pair $colorbacklinepairhover = '230,237,244'; // line hover $colorbacklinepairchecked = '230,237,244'; // line checked -$colorbacklinebreak = '233,228,230'; // line break +$colorbacklinebreak = '253,251,250'; // line break $colorbackbody = '255,255,255'; $colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120 $colortexttitle = '0,0,0'; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index da2df5eb788..36fb265c42a 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -242,6 +242,7 @@ print '*/'."\n"; --colorbacklinepair2: rgb(); --colorbacklinepairhover: rgb(); --colorbacklinepairchecked: rgb(); + --colorbacklinebreak: rgb(); --colorbackbody: rgb(); --colortexttitlenotab: rgb(); --colortexttitle: rgb(); @@ -3284,10 +3285,10 @@ ul.noborder li:nth-child(odd):not(.liste_titre) { } .impair, .nohover .impair:hover, tr.impair td.nohover { - background: #; + background: var(--colorbacklineimpair1); } #GanttChartDIV { - background-color: #; + background-color: var(--colorbacklineimpair1); } .oddeven, .evenodd, .pair, .nohover .pair:hover, tr.pair td.nohover, .tagtr.oddeven { @@ -3296,25 +3297,26 @@ ul.noborder li:nth-child(odd):not(.liste_titre) { color: #202020; } .pair, .nohover .pair:hover, tr.pair td.nohover { - background-color: #; + background-color: var(--colorbacklinepair1); } + table.dataTable tr.oddeven { - background-color: # !important; + background-color: var(--colorbacklinepair1) !important; } /* For no hover style */ td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover { - background-color: # !important; - background: # !important; + background-color: var(--colorbacklineimpair1) !important; !important; + background: var(--colorbacklineimpair1) !important; !important; } td.evenodd, tr.nohoverpair td, #trlinefordates td { - background-color: # !important; - background: # !important; + background-color: var(--colorbacklinepair1) !important; !important; + background: var(--colorbacklinepair1) !important; !important; } .trforbreak td { font-weight: bold; border-bottom: 1pt solid black !important; - /* background-color: # !important; */ + background-color: var(--colorbacklinebreak) !important; } table.dataTable td { diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php index 6cdd37fe913..ffad2cc66b5 100644 --- a/htdocs/theme/md/theme_vars.inc.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -61,7 +61,7 @@ $colorbacklinepair1 = '248,248,248'; // line pair $colorbacklinepair2 = '246,246,246'; // line pair $colorbacklinepairhover = '230,237,244'; // line hover $colorbacklinepairchecked = '230,237,244'; // line checked -$colorbacklinebreak = '214,218,220'; +$colorbacklinebreak = '250,246,251'; $colorbackbody = '248,248,248'; $colortexttitlenotab = '80,71,5'; $colortexttitle = '20,20,20'; diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index b0f3a5aab6c..83289521538 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -192,13 +192,13 @@ elseif (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.' $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width = 128; } -elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png')) +elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg'; } -elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) +elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } // Security graphical code diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 3cb23b36fbc..b2534ee92dd 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -52,7 +52,15 @@ if (isset($_GET["hashp"]) && !defined("NOLOGIN")) if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip } // Some value of modulepart can be used to get resources that are public so no login are required. -if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) +if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') +{ + if (!defined("NOLOGIN")) define("NOLOGIN", 1); + if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} + +// Used by TakePOS Auto Order +if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'product' && isset($_GET["publictakepos"])) { if (!defined("NOLOGIN")) define("NOLOGIN", 1); if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. @@ -195,6 +203,12 @@ if (!empty($hashp)) $accessallowed = 1; // When using hashp, link is public so we force $accessallowed $sqlprotectagainstexternals = ''; } +elseif (isset($_GET["publictakepos"])) +{ + if (! empty($conf->global->TAKEPOS_AUTO_ORDER)) { + $accessallowed = 1; // Only if TakePOS Public Auto Order is enabled and received publictakepos variable + } +} else { // Basic protection (against external users only)