diff --git a/ChangeLog b/ChangeLog index 57714680554..18f9fbe2dcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ For Users: NEW: Module Ticket is available as a stable module. NEW: Experimental module "Vendor receptions". NEW: Experimental module "BOM". +FIX: Disallow line start date to be after end date For Developers: NEW: Module DebugBar is available as a stable module. diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index e0b8c6f70c2..089c156eb04 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -247,7 +247,7 @@ if ($resql) print ''; print ''; - $newcardbutton = '' . $langs->trans("Addanaccount").''; + $newcardbutton = '' . $langs->trans("Addanaccount").''; $newcardbutton.= ''; $newcardbutton.= ''; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 795edda5f4c..16c5b508b1c 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -113,11 +113,11 @@ if ($result) if (! empty($user->rights->accounting->fiscalyear)) { - $addbutton = '' . $langs->trans("NewFiscalYear") .''; + $addbutton = '' . $langs->trans("NewFiscalYear") .''; } else { - $addbutton = '' . $langs->trans("NewFiscalYear") .''; + $addbutton = '' . $langs->trans("NewFiscalYear") .''; } $title = $langs->trans('AccountingPeriods'); diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 07df2a91872..37ec3c4e503 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -333,7 +333,7 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print ''; // Current account print ''; - print ''; + print ''; $listofvals=array('withoutvalidaccount'=>$langs->trans("WithoutValidAccount"), 'withvalidaccount'=>$langs->trans("WithValidAccount")); print ' '.$langs->trans("or").' '.$form->selectarray('search_current_account_valid', $listofvals, $search_current_account_valid, 1); print ''; @@ -481,6 +481,14 @@ if ($result) }); init_savebutton(); + + jQuery("#search_current_account").keyup(function() { + if (jQuery("#search_current_account").val() != \'\') + { + console.log("We set a value of account to search "+jQuery("#search_current_account").val()+", so we disable the other search criteria on account"); + jQuery("#search_current_account_valid").val(-1); + } + }); }); '; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 790a71f96f4..207ea3464d8 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -451,7 +451,7 @@ $button.= ''; $groupby = ' ' . $langs->trans("GroupByAccountAccounting") . ''; -$newcardbutton = '' . $langs->trans("NewAccountingMvt").''; +$newcardbutton = ''.$langs->trans("NewAccountingMvt").''; $newcardbutton.= ''; $newcardbutton.= ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 8988491c927..38dc49c5bf6 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -257,7 +257,7 @@ if ($action == 'delbookkeepingyear') { print '
'; $viewflat = ' ' . $langs->trans("ViewFlatList") . ''; -$newcardbutton = '' . $langs->trans("NewAccountingMvt").''; +$newcardbutton = ''.$langs->trans("NewAccountingMvt").''; $newcardbutton.= ''; $newcardbutton.= ''; diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 3869afccf6d..f6c178f2e4d 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -151,7 +151,7 @@ if ($object->id > 0) $newcardbutton = ''; if (! empty($conf->agenda->enabled)) { - $newcardbutton.=''.$langs->trans("AddAction").''; + $newcardbutton.=''.$langs->trans("AddAction").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 1d16f82ec04..bafd24b0ff5 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -365,7 +365,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->adherent->creer) { - $newcardbutton=''.$langs->trans('NewMember').''; + $newcardbutton=''.$langs->trans('NewMember').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 295a565f0c5..26293f8a4ac 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -247,7 +247,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->adherent->cotisation->creer) { - $newcardbutton=''.$langs->trans('NewSubscription').''; + $newcardbutton=''.$langs->trans('NewSubscription').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 18c0ba28348..72ea99ff18d 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -232,7 +232,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') $newcardbutton=''; if ($user->rights->adherent->configurer) { - $newcardbutton=''.$langs->trans('NewMemberType').''; + $newcardbutton=''.$langs->trans('NewMemberType').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index fd74938d802..50c54621b51 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -178,10 +178,9 @@ if ($action == 'confirm_collect') dol_include_once('/emailcollector/class/emailcollector.class.php'); $res = $object->doCollectOneCollector(); - if ($res > 0) { - setEventMessages($object->output, null, 'mesgs'); + setEventMessages($object->lastresult, null, 'mesgs'); } else { @@ -391,7 +390,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir); $connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir); - $connection = imap_open($connectstringsource, $object->user, $object->password); + $connection = imap_open($connectstringsource, $object->login, $object->password); } else { @@ -443,8 +442,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Add filter print ''; print ''; - $arrayoftypes=array('from'=>'MailFrom', 'to'=>'MailTo', 'cc'=>'Cc', 'bcc'=>'Bcc', 'subject'=>'Subject', 'body'=>'Body', 'seen'=>'AlreadyRead', 'unseen'=>'NotRead', 'withtrackingid'=>'WithDolTrackingID', 'withouttrackingid'=>'WithoutDolTrackingID'); - print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1); + $arrayoftypes=array( + 'from'=>'MailFrom', + 'to'=>'MailTo', + 'cc'=>'Cc', + 'bcc'=>'Bcc', + 'subject'=>'Subject', + 'body'=>'Body', + 'X1'=>'---', + 'seen'=>'AlreadyRead', + 'unseen'=>'NotRead', + 'X2'=>'---', + 'withtrackingid'=>'WithDolTrackingID', + 'withouttrackingid'=>'WithoutDolTrackingID' + ); + print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', '', 0, '', 2); print ''; print ''; print ''; @@ -462,7 +474,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''.$rulefilter['rulevalue'].''; print ''; - //print $rulefilterobj->getLibStatut(3); print ' '.img_delete().''; print ''; print ''; diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index e8dbc07654c..a5c167f08e8 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -321,7 +321,7 @@ print ''; $newcardbutton=''; //if ($user->rights->emailcollector->creer) //{ -$newcardbutton=''.$langs->trans('New').''; +$newcardbutton=''.$langs->trans('New').''; $newcardbutton.= ''; $newcardbutton.= ''; //} diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index ca160a7dfda..c61cf4f81a2 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -51,48 +51,52 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; * View */ +$form=new Form($db); + $page_name = "ExportSetup"; llxHeader('', $langs->trans($page_name)); // Subheader -$linkback = '' - . $langs->trans("BackToModuleList") . ''; +$linkback = '' . $langs->trans("BackToModuleList") . ''; + print load_fiche_titre($langs->trans($page_name), $linkback); -// Configuration header +//$head = export_admin_prepare_head(); +$h=0; +$head = array(); +$head[$h][0] = DOL_URL_ROOT.'/admin/export.php'; +$head[$h][1] = $langs->trans("Setup"); +$head[$h][2] = 'setup'; +$h++; -dol_fiche_head( - $head, - 'settings', - $langs->trans("ExportsArea"), - 0, - "exports" -); +dol_fiche_head($head, 'setup', $langs->trans("ExportsArea"), -1, "exports"); -// Setup page goes here -$form=new Form($db); print ''; print ''; -print ''."\n"; +print ''."\n"; print ''; print ''."\n"; // Example with a yes / no select print ''; -print ''; +print ''; print ''; print ''; print '
'.$langs->trans("ExportModel").''.$langs->trans("Parameters").' 
'.$langs->trans("set_EXPORTS_SHARE_MODELS").''.$langs->trans("EXPORTS_SHARE_MODELS").' '; + print ''; print ''; print ''; echo ajax_constantonoff('EXPORTS_SHARE_MODELS'); print ''; + print '
'; +dol_fiche_end(); + // End of page llxFooter(); $db->close(); diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 5283d9a3aca..310322aa44c 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -256,7 +256,7 @@ if ($action == 'delete') $newcardbutton=''; if ($user->admin) { - $newcardbutton=''.$langs->trans('New').''; + $newcardbutton=''.$langs->trans('New').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 9498fe06d6b..2a9983d95b1 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -224,12 +224,12 @@ else print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup'); -print ''.$langs->trans("TranslationDesc")."
\n"; -print "
\n"; +//print ''.$langs->trans("TranslationDesc")."
\n"; +//print "
\n"; $current_language_code=$langs->defaultlang; $s=picto_from_langcode($current_language_code); -print $langs->trans("CurrentUserLanguage").': '.$s.' '.$current_language_code.'
'; +print $form->textwithpicto($langs->trans("CurrentUserLanguage").': '.$s.' '.$current_language_code.'', $langs->trans("TranslationDesc")).'
'; print '
'; diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index baa2ced0c4a..3b3b5ac9e15 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -316,13 +316,13 @@ print ''; $newcardbutton=''; //if ($user->rights->bom->creer) //{ - $newcardbutton=''.$langs->trans('New').''; + $newcardbutton=''.$langs->trans('New').''; $newcardbutton.= ''; $newcardbutton.= ''; //} //else //{ -// $newcardbutton=''.$langs->trans('New'); +// $newcardbutton=''.$langs->trans('New').''; // $newcardbutton.= ''; // $newcardbutton.= ''; //} diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index fba3e58baeb..17e23f0cadb 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -84,7 +84,7 @@ llxHeader('', $langs->trans("ListOfBookmarks")); $newcardbutton=''; if ($user->rights->bookmark->creer) { - $newcardbutton=''.$langs->trans('NewBookmark').''; + $newcardbutton=''.$langs->trans('NewBookmark').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index ce98dcbb6fc..971fcd30f0c 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -65,7 +65,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css') llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss); -$newcardbutton = ''.$langs->trans("NewCategory").''; +$newcardbutton = ''.$langs->trans("NewCategory").''; $newcardbutton.= ''; $newcardbutton.= ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index c6a4c3d225c..5654b3cb37f 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -903,7 +903,7 @@ if ($action == 'create') $numproject=$formproject->select_projects((! empty($societe->id)?$societe->id:-1), $projectid, 'projectid', 0, 0, 1, 1); - print '   '.$langs->trans("AddProject").' '; + print '   '.$langs->trans("AddProject").''; $urloption='?action=create'; $url = dol_buildpath('comm/action/card.php', 2).$urloption; @@ -1301,7 +1301,7 @@ if ($id > 0) $numprojet=$formproject->select_projects(($object->socid > 0 ? $object->socid : -1), $object->fk_project, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0); if ($numprojet==0) { - print '   '.$langs->trans("AddProject").' '; + print '   '.$langs->trans("AddProject").''; } print ''; } diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index ded7d4fd238..9869248a760 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -435,7 +435,7 @@ if ($resql) //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; - $newcardbutton = ''.$langs->trans("AddAction").''; + $newcardbutton = ''.$langs->trans("AddAction").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 2ed25c9dd55..e5ade3fdf55 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -367,7 +367,7 @@ if ($user->rights->agenda->myactions->create || $user->rights->agenda->allaction //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; - $newcardbutton = ''.$langs->trans("AddAction").''; + $newcardbutton = ''.$langs->trans("AddAction").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 4e49b7bbbbd..54fdaef111b 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -156,7 +156,7 @@ if ($result) $newcardbutton=''; if ($user->rights->mailing->creer) { - $newcardbutton=''.$langs->trans('NewMailing').''; + $newcardbutton=''.$langs->trans('NewMailing').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 2859fcf9052..4a0a9afce95 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1591,7 +1591,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; @@ -1678,7 +1678,7 @@ if ($action == 'create') print ''; print '' . $langs->trans("Project") . ''; $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1); - print '   id).'">' . $langs->trans("AddProject") . ' '; + print '   id).'">' . $langs->trans("AddProject") . ''; print ''; print ''; } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index d585d7c9ab9..388433222e0 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -473,6 +473,12 @@ class Propal extends CommonObject // Check parameters if ($type < 0) return -1; + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } $this->db->begin(); @@ -666,7 +672,7 @@ class Propal extends CommonObject */ public function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) { - global $mysoc; + global $mysoc, $langs; dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, type=$type, date_start=$date_start, date_end=$date_end"); @@ -684,6 +690,12 @@ class Propal extends CommonObject if (empty($qty) && empty($special_code)) $special_code=3; // Set option tag if (! empty($qty) && $special_code == 3) $special_code=0; // Remove option tag if (empty($type)) $type=0; + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } if ($this->statut == self::STATUS_DRAFT) { diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 0b3179bd239..2a1d1b5b577 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -438,7 +438,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->propal->creer) { - $newcardbutton=''.$langs->trans('NewPropal').''; + $newcardbutton=''.$langs->trans('NewPropal').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 1f370625d5c..bdd17ad217f 100755 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1637,7 +1637,7 @@ if ($action == 'create' && $user->rights->commande->creer) }); '; } - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; @@ -1728,7 +1728,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print '' . $langs->trans("Project") . ''; $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0); - print '   id).'">' . $langs->trans("AddProject") . ' '; + print '   id).'">' . $langs->trans("AddProject") . ''; print ''; print ''; } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 70c5b2d45f0..07b7a907150 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1367,6 +1367,12 @@ class Commande extends CommonOrder // Check parameters if ($type < 0) return -1; + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } $this->db->begin(); @@ -2932,7 +2938,6 @@ class Commande extends CommonOrder if ($this->statut == Propal::STATUS_DRAFT) { - $this->db->begin(); // Clean parameters if (empty($qty)) $qty=0; @@ -2942,6 +2947,12 @@ class Commande extends CommonOrder if (empty($txlocaltax2)) $txlocaltax2=0; if (empty($remise_percent)) $remise_percent=0; if (empty($special_code) || $special_code == 3) $special_code=0; + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } $remise_percent=price2num($remise_percent); $qty=price2num($qty); @@ -2951,6 +2962,8 @@ class Commande extends CommonOrder $txtva=price2num($txtva); $txlocaltax1=price2num($txlocaltax1); $txlocaltax2=price2num($txlocaltax2); + + $this->db->begin(); // Calcul du total TTC et de la TVA pour la ligne a partir de // qty, pu, remise_percent et txtva diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 7d837b12072..f42289c1c4b 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -441,7 +441,7 @@ if ($resql) $newcardbutton=''; if ($contextpage == 'orderlist' && $user->rights->commande->creer) { - $newcardbutton=''.$langs->trans('NewOrder').''; + $newcardbutton=''.$langs->trans('NewOrder').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 68354d1961f..1304c3ce75d 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -757,11 +757,11 @@ if ($resql) if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments { if ($user->rights->banque->modifier) { - $newcardbutton = ''.$langs->trans("AddBankRecord").''; + $newcardbutton = ''.$langs->trans("AddBankRecord").''; $newcardbutton.= ''; $newcardbutton.= ''; } else { - $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton = ''.$langs->trans("AddBankRecord").''; $newcardbutton.= ''; $newcardbutton.= ''; } @@ -769,11 +769,11 @@ if ($resql) else // If direct entries is not done using miscellaneous payments { if ($user->rights->banque->modifier) { - $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton = ''.$langs->trans("AddBankRecord").''; $newcardbutton.= ''; $newcardbutton.= ''; } else { - $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton = ''.$langs->trans("AddBankRecord").''; $newcardbutton.= ''; $newcardbutton.= ''; } @@ -781,7 +781,7 @@ if ($resql) } else { - $newcardbutton = ''.$langs->trans("AddBankRecord"); + $newcardbutton = ''.$langs->trans("AddBankRecord").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index b0a7f546297..8cc396f3bc1 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -227,7 +227,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->banque->configurer) { - $newcardbutton.=''.$langs->trans("NewFinancialAccount").''; + $newcardbutton.=''.$langs->trans("NewFinancialAccount").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index b3624e274f2..8be0b075e40 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -157,7 +157,7 @@ if ($result) $newcardbutton=''; if ($user->rights->banque->modifier) { - $newcardbutton=''.$langs->trans('MenuNewVariousPayment').''; + $newcardbutton=''.$langs->trans('MenuNewVariousPayment').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 89b66531eec..71be539f974 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -337,7 +337,7 @@ print ''; $newcardbutton=''; //if ($user->rights->monmodule->creer) //{ -$newcardbutton=''.$langs->trans('New').''; +$newcardbutton=''.$langs->trans('New').''; $newcardbutton.= ''; $newcardbutton.= ''; //} diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ed1f2e50a39..2f4116e938f 100755 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2698,7 +2698,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; @@ -3094,7 +3094,7 @@ if ($action == 'create') $langs->load('projects'); print '' . $langs->trans('Project') . ''; $numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1); - print '   id.($fac_rec?'&fac_rec='.$fac_rec:'')).'">' . $langs->trans("AddProject") . ' '; + print '   id.($fac_rec?'&fac_rec='.$fac_rec:'')).'">' . $langs->trans("AddProject") . ''; print ''; } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 8bf86599eb4..15d985db6bf 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2720,6 +2720,12 @@ class Facture extends CommonInvoice // Check parameters if ($type < 0) return -1; + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } $this->db->begin(); @@ -2923,6 +2929,12 @@ class Facture extends CommonInvoice return -3; } } + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } $this->db->begin(); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 39978cd82d1..749a0b28cfb 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -594,7 +594,7 @@ if ($resql) $newcardbutton=''; if($user->rights->facture->creer) { - $newcardbutton=''.$langs->trans('NewBill').''; + $newcardbutton=''.$langs->trans('NewBill').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index 8d02d8390dd..184c9600926 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -45,7 +45,7 @@ $localtax_static = new Localtax($db); $newcardbutton=''; if ($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('NewLocalTaxPayment', ($ltt+1)).''; + $newcardbutton=''.$langs->trans('NewLocalTaxPayment', ($ltt+1)).''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 6e86ecf14b6..0107ba60383 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -138,7 +138,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->banque->cheque) { - $newcardbutton = ''.$langs->trans('NewCheckDeposit').''; + $newcardbutton = ''.$langs->trans('NewCheckDeposit').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index fcd48a6a305..49f44af1702 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -108,7 +108,7 @@ if ($result) $newcardbutton=''; if ($user->rights->prelevement->bons->creer) { - $newcardbutton = ''.$langs->trans('NewStandingOrder').''; + $newcardbutton = ''.$langs->trans('NewStandingOrder').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/salaries/list.php b/htdocs/compta/salaries/list.php index e0fb1b38636..6ce49536d20 100644 --- a/htdocs/compta/salaries/list.php +++ b/htdocs/compta/salaries/list.php @@ -150,7 +150,7 @@ if ($result) $newcardbutton=''; if (! empty($user->rights->salaries->write)) { - $newcardbutton=''.$langs->trans('NewSalaryPayment').''; + $newcardbutton=''.$langs->trans('NewSalaryPayment').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 8a8cc1f61b8..f5e88c7fb29 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -152,7 +152,7 @@ if ($resql) $newcardbutton=''; if($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('MenuNewSocialContribution'); + $newcardbutton=''.$langs->trans('MenuNewSocialContribution').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 6d5f5ffbc13..061008f42a8 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -150,7 +150,7 @@ if ($result) $newcardbutton=''; if ($user->rights->tax->charges->creer) { - $newcardbutton=''.$langs->trans('NewVATPayment'); + $newcardbutton=''.$langs->trans('NewVATPayment').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index cf2c198d36e..5b9e84f2d16 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -261,7 +261,7 @@ else { if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) { - $newcardbutton.=''.$langs->trans("AddAction").''; + $newcardbutton.=''.$langs->trans("AddAction").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 4419c087a3c..a5fe555151f 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -453,7 +453,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->societe->contact->creer) { - $newcardbutton=''.$langs->trans('NewContactAddress').''; + $newcardbutton=''.$langs->trans('NewContactAddress').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 35a5ac78b2e..c61e2e6177a 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1212,7 +1212,7 @@ if ($action == 'create') { print ''; print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print ''."\n"; @@ -1254,7 +1254,7 @@ if ($action == 'create') print ''.$langs->trans("Project").''; $formproject->select_projects(($soc->id>0?$soc->id:-1), $projectid, "projectid", 0, 0, 1, 1); - print '   id).'">' . $langs->trans("AddProject") . ' '; + print '   id).'">' . $langs->trans("AddProject") . ''; print ""; } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index f89ad5e7307..79fc66dfce8 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1374,7 +1374,6 @@ class Contrat extends CommonObject if ($this->statut >= 0) { - $this->db->begin(); // Clean parameters $pu_ht=price2num($pu_ht); @@ -1394,7 +1393,7 @@ class Contrat extends CommonObject if (empty($txtva) || ! is_numeric($txtva)) $txtva=0; if (empty($txlocaltax1) || ! is_numeric($txlocaltax1)) $txlocaltax1=0; if (empty($txlocaltax2) || ! is_numeric($txlocaltax2)) $txlocaltax2=0; - + if ($price_base_type=='HT') { $pu=$pu_ht; @@ -1406,6 +1405,14 @@ class Contrat extends CommonObject // Check parameters if (empty($remise_percent)) $remise_percent=0; + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } + + $this->db->begin(); $localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc); @@ -1596,6 +1603,12 @@ class Contrat extends CommonObject { $remise_percent=0; } + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $date_debut_reel, $date_fin_reel, $tvatx, $localtax1tx, $localtax2tx, $price_base_type, $info_bits"); diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 1e8fbcbfdee..1235fe301cf 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -204,7 +204,7 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print ''; + print '
'; // Ligne info remises tiers diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index d27460e4b6a..22e30466300 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Juanjo Menent @@ -25,7 +25,7 @@ /** * \file htdocs/contrat/list.php * \ingroup contrat - * \brief Page liste des contrats + * \brief Page to list contracts */ require '../main.inc.php'; @@ -375,7 +375,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->contrat->creer) { - $newcardbutton=''.$langs->trans('NewContractSubscription').''; + $newcardbutton=''.$langs->trans('NewContractSubscription').''; $newcardbutton.= ''; $newcardbutton.= ''; } @@ -549,11 +549,11 @@ if (! empty($arrayfields['lower_planned_end_date']['checked'])) { print ''; } // Status @@ -568,18 +568,18 @@ print ''; print "\n"; print ''; -if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", "$param", '', $sortfield, $sortorder); -if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer", "", "$param", '', $sortfield, $sortorder); -if (! empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier", "", "$param", '', $sortfield, $sortorder); -if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", "$param", '', $sortfield, $sortorder); -if (! empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", "$param", '', $sortfield, $sortorder); +if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder); +if (! empty($arrayfields['c.ref_customer']['checked'])) print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer", "", $param, '', $sortfield, $sortorder); +if (! empty($arrayfields['c.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier", "", $param, '', $sortfield, $sortorder); +if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); +if (! empty($arrayfields['s.email']['checked'])) print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", $param, '', $sortfield, $sortorder); 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, '', $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['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", "$param", '', $sortfield, $sortorder); -if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", "$param", '', $sortfield, $sortorder, 'center '); +if (! empty($arrayfields['sale_representative']['checked'])) print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder); +if (! empty($arrayfields['c.date_contrat']['checked'])) print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", $param, '', $sortfield, $sortorder, 'center '); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 2fb79ca56f2..4f61435f124 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5841,10 +5841,10 @@ class Form * @param string $morecss Add more class to css styles * @param int $addjscombo Add js combo * @param string $moreparamonempty Add more param on the empty option line. Not used if show_empty not set - * @param int $disablebademail Check if an email is found into value and if not disable and colorize entry + * @param int $disablebademail 1=Check if a not valid email, 2=Check string '---', and if found into value, disable and colorize entry * @param int $nohtmlescape No html escaping. * @return string HTML select string. - * @see multiselectarray, selectArrayAjax, selectArrayFilter + * @see multiselectarray(), selectArrayAjax(), selectArrayFilter() */ public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, $key_in_label = 0, $value_as_key = 0, $moreparam = '', $translate = 0, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '', $addjscombo = 0, $moreparamonempty = '', $disablebademail = 0, $nohtmlescape = 0) { @@ -5902,9 +5902,9 @@ class Form $disabled=''; $style=''; if (! empty($disablebademail)) { - if (! preg_match('/<.+@.+>/', $value)) + if (($disablebademail == 1 && ! preg_match('/<.+@.+>/', $value)) + || ($disablebademail == 2 && preg_match('/---/', $value))) { - //$value=preg_replace('/'.preg_quote($a,'/').'/', $b, $value); $disabled=' disabled'; $style=' class="warning"'; } diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 6afe7552187..c9c1bc3d782 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -205,7 +205,7 @@ class FormActions $newcardbutton=''; if (! empty($conf->agenda->enabled)) { - $newcardbutton = ''.$langs->trans("AddEvent").''; + $newcardbutton = ''.$langs->trans("AddEvent").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 1bb59077bec..3957e44daf5 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -63,8 +63,8 @@ class FormOther * @param string $selected Id modele pre-selectionne * @param string $htmlname Nom de la zone select * @param string $type Type des modeles recherches - * @param int $useempty Affiche valeur vide dans liste - * @param int $fk_user Utilisateur créant le modèle + * @param int $useempty Show an empty value in list + * @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on) * @return void */ public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null) @@ -73,7 +73,7 @@ class FormOther $sql = "SELECT rowid, label"; $sql.= " FROM ".MAIN_DB_PREFIX."export_model"; $sql.= " WHERE type = '".$type."'"; - if (!empty($fk_user)) $sql.=" AND fk_user=".$fk_user; + if (!empty($fk_user)) $sql.=" AND fk_user IN (0, ".$fk_user.")"; // An export model $sql.= " ORDER BY rowid"; $result = $this->db->query($sql); if ($result) @@ -848,7 +848,7 @@ class FormOther * @param string $morecss More Css * @return string */ - public function select_month($selected = '', $htmlname = 'monthid', $useempty = 0, $longlabel = 0, $morecss = '') + public function select_month($selected = '', $htmlname = 'monthid', $useempty = 0, $longlabel = 0, $morecss = 'maxwidth50imp valignmiddle') { // phpcs:enable global $langs; @@ -895,7 +895,7 @@ class FormOther * @param string $morecss More CSS * @return string */ - public function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle widthauto') + public function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp') { // phpcs:enable print $this->selectyear($selected, $htmlname, $useempty, $min_year, $max_year, $offset, $invert, $option, $morecss); @@ -915,7 +915,7 @@ class FormOther * @param string $morecss More css * @return string */ - public function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle widthauto') + public function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp') { $out=''; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 32ee83ae027..d6fe993aa2d 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -730,7 +730,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel $newcardbutton=''; if (! empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) { - $newcardbutton=''.$langs->trans("AddProject").''; + $newcardbutton=''.$langs->trans("AddProject").''; $newcardbutton.= ''; $newcardbutton.= ''; } @@ -934,7 +934,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') if ($user->rights->societe->contact->creer) { $addcontact = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); - $newcardbutton=''.$addcontact.''; + $newcardbutton=''.$addcontact.''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f1c67429d95..0937981164b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8027,7 +8027,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st } if ($displayMode === 2) { - $return = $htmlImg .' '. $htmlLabel; + $return = $htmlImg .' '. $htmlLabelShort; } elseif ($displayMode === 3) { $return = $htmlImg; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index ab905f745de..1aceb9c60ef 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -346,13 +346,13 @@ print ''; $newcardbutton=''; if ($user->rights->cron->create) { - $newcardbutton.=''.$langs->trans("CronCreateJob").''; + $newcardbutton.=''.$langs->trans("CronCreateJob").''; $newcardbutton.= ''; $newcardbutton.= ''; } else { - $newcardbutton.=''.$langs->trans("CronCreateJob").''; + $newcardbutton.=''.$langs->trans("CronCreateJob").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 08eb9efb094..4a3dbf1bf52 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -372,7 +372,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; print ''; } print '' . "\n"; diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 15648375677..e68b4e46399 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -142,7 +142,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->don->creer) { - $newcardbutton=''.$langs->trans('NewDonation').''; + $newcardbutton=''.$langs->trans('NewDonation').''; $newcardbutton.= ''; $newcardbutton.= ''; } @@ -200,7 +200,7 @@ if ($resql) print $searchpicto; print ''; print "\n"; - + print ''; print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "d.rowid", "", $param, "", $sortfield, $sortorder); if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { @@ -231,7 +231,7 @@ if ($resql) $donationstatic->firstname=$objp->firstname; print ""; if (! empty($conf->global->DONATION_USE_THIRDPARTIES)) { - + $company=new Societe($db); $result=$company->fetch($objp->socid); if (!empty($objp->socid) && $company->id > 0) { diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4186d4eae3f..74c71104777 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -961,7 +961,7 @@ if ($action == 'create') print ''; print ''; print ''; } diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 371be10adbd..6609ff358f9 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -279,7 +279,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->expedition->creer) { - $newcardbutton=''.$langs->trans('NewSending').''; + $newcardbutton=''.$langs->trans('NewSending').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index c221baf7d65..242b60920fe 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -455,7 +455,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->expensereport->creer) { - $newcardbutton=''.$langs->trans('NewTrip').''; + $newcardbutton=''.$langs->trans('NewTrip').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 98b1f4552a0..83208ffa020 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -52,11 +52,11 @@ if (count($export->array_export_code)) { if ($user->rights->export->creer) { - print ''.$langs->trans("NewExport").''; + print ''.$langs->trans("NewExport").''; } else { - print ''.$langs->trans("NewExport").''; + print ''.$langs->trans("NewExport").''; } } print ''; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index d9434d018c3..47e7dd48589 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -948,7 +948,7 @@ if ($action == 'create') $numprojet=$formproject->select_projects($soc->id, $projectid, 'projectid'); if ($numprojet==0) { - print '   '.$langs->trans("AddProject").' '; + print '   '.$langs->trans("AddProject").''; } print ''; } @@ -961,7 +961,7 @@ if ($action == 'create') $numcontrat=$formcontract->select_contract($soc->id, GETPOST('contratid', 'int'), 'contratid', 0, 1); if ($numcontrat==0) { - print '   '.$langs->trans("AddContract").' '; + print '   '.$langs->trans("AddContract").''; } print ''; } diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index c105d06a852..2a24f1f31ea 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -293,7 +293,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->ficheinter->creer) { - $newcardbutton=''.$langs->trans('NewIntervention').''; + $newcardbutton=''.$langs->trans('NewIntervention').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 5f7789e72f5..3573484f7c7 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1543,6 +1543,11 @@ class CommandeFournisseur extends CommonOrder return -1; } if ($type < 0) return -1; + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } $this->db->begin(); @@ -2470,7 +2475,7 @@ class CommandeFournisseur extends CommonOrder */ public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $notrigger = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') { - global $mysoc, $conf; + global $mysoc, $conf, $langs; dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $type, $fk_unit"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -2478,8 +2483,6 @@ class CommandeFournisseur extends CommonOrder if ($this->brouillon) { - $this->db->begin(); - // Clean parameters if (empty($qty)) $qty=0; if (empty($info_bits)) $info_bits=0; @@ -2500,6 +2503,13 @@ class CommandeFournisseur extends CommonOrder // Check parameters if ($type < 0) return -1; + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } + + $this->db->begin(); // Calcul du total TTC et de la TVA pour la ligne a partir de // qty, pu, remise_percent et txtva diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index bf9241e0754..703b90cc831 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1616,6 +1616,12 @@ class FactureFournisseur extends CommonInvoice if (!preg_match('/\((.*)\)/', $txtva)) { $txtva = price2num($txtva); // $txtva can have format '5,1' or '5.1' or '5.1(XXX)', we must clean only if '5,1' } + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } $this->db->begin(); @@ -1837,7 +1843,7 @@ class FactureFournisseur extends CommonInvoice */ public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1 = 0, $txlocaltax2 = 0, $qty = 1, $idproduct = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $remise_percent = 0, $notrigger = false, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') { - global $mysoc; + global $mysoc, $langs; dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$notrigger,$date_start,$date_end,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -1849,6 +1855,12 @@ class FactureFournisseur extends CommonInvoice // Check parameters //if (! is_numeric($pu) || ! is_numeric($qty)) return -1; if ($type < 0) return -1; + + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error=$langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } // Clean parameters if (empty($vatrate)) $vatrate=0; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d788e2c8628..7fc1b990c09 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1559,7 +1559,7 @@ if ($action=='create') }); '; } - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; } print ''; @@ -1621,7 +1621,7 @@ if ($action=='create') $langs->load('projects'); print ''; } diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index a2351dd7d9a..ec728ccaf07 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -631,7 +631,7 @@ if ($resql) $newcardbutton=''; if($user->rights->fournisseur->commande->creer) { - $newcardbutton=''.$langs->trans('NewOrder').''; + $newcardbutton=''.$langs->trans('NewOrder').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5c147d6f195..b2d7597e2e5 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1756,7 +1756,7 @@ if ($action == 'create') }); '; } - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; } print ''; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 3a710642b03..9c9071b8a14 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -466,7 +466,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->fournisseur->facture->creer) { - $newcardbutton=''.$langs->trans('NewBill').''; + $newcardbutton=''.$langs->trans('NewBill').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 2a77c9e1068..4679bf125b5 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -340,7 +340,7 @@ else $newcardbutton=''; if ($user->rights->holiday->write) { - $newcardbutton=''.$langs->trans('MenuAddCP').''; + $newcardbutton=''.$langs->trans('MenuAddCP').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index b493534f772..6ccb0adcf44 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -92,7 +92,7 @@ if (count($import->array_import_code)) { //if ($user->rights->import->run) //{ - print ''.$langs->trans("NewImport").''; + print ''.$langs->trans("NewImport").''; //} //else //{ diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 4928bfe7856..34d903a0da7 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -9,6 +9,7 @@ -- Copyright (C) 2012 Sebastian Neuwert -- Copyright (C) 2012 Ricardo Schluter -- Copyright (C) 2015 Ferran Marcet +-- Copyright (C) 2019~ Lao Tian <281388879@qq.com> -- -- 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 @@ -352,3 +353,39 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES (25 -- Regions Slovenia (rowid country=202) INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ('202', '20203', 'SI03', NULL, 'East Slovenia'); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) VALUES ('202', '20204', 'SI04', NULL, 'West Slovenia'); + +-- Regions China (rowid country=9) +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,901, '京',0,'北京市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,902, '津',0,'天津市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,903, '沪',0,'上海市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,904, '渝',0,'重庆市'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,905, '冀',0,'河北省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,906, '晋',0,'山西省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,907, '辽',0,'辽宁省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,908, '吉',0,'吉林省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,909, '黑',0,'黑龙江省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,910, '苏',0,'江苏省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,911, '浙',0,'浙江省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,912, '皖',0,'安徽省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,913, '闽',0,'福建省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,914, '赣',0,'江西省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,915, '鲁',0,'山东省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,916, '豫',0,'河南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,917, '鄂',0,'湖北省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,918, '湘',0,'湖南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,919, '粤',0,'广东省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,920, '琼',0,'海南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,921, '川',0,'四川省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,922, '贵',0,'贵州省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,923, '云',0,'云南省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,924, '陕',0,'陕西省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,925, '甘',0,'甘肃省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,926, '青',0,'青海省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,927, '台',0,'台湾省'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,928, '蒙',0,'内蒙古自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,929, '桂',0,'广西壮族自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,930, '藏',0,'西藏自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,931, '宁',0,'宁夏回族自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,932, '新',0,'新疆维吾尔自治区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,933, '港',0,'香港特别行政区'); +insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (9,934, '澳',0,'澳门特别行政区'); diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql index 6312fa5785f..e4071e5500a 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, fk_emailcollector INTEGER NOT NULL, type varchar(128) NOT NULL, - rulevalue varchar(255) NULL, + rulevalue varchar(128) NULL, date_creation datetime NOT NULL, tms timestamp NOT NULL, fk_user_creat integer NOT NULL, diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 6719b35f795..dde854f1925 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1837,7 +1837,7 @@ XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (f RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) CodeLastResult=Result code of last collect -NbOfEmailsInInbox=Number of email in source directory +NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party from name (load only) LoadThirdPartyFromNameOrCreate=Load third party from name (create if not found) WithDolTrackingID=Dolibarr Tracking ID found @@ -1848,7 +1848,6 @@ ECMAutoTree=Show automatic ECM tree OperationParamDesc=Define values to use for action, or how to extract values. For example:
VALUE:abc
REGEX:SUBJECT:([^\s]*)
REGEX:BODY:My company name is\s([^\s]*) OpeningHours=Opening hours OpeningHoursDesc=Enter here the regular opening hours of your company. -##### Resource #### ResourceSetup=Configuration of Resource module UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). DisabledResourceLinkUser=Disable feature to link a resource to users @@ -1871,4 +1870,6 @@ LogsLinesNumber=Number of lines to show on logs tab UseDebugBar=Use the debug bar DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output -DebugBarModuleActivated=Module debugbar is activated and slows dramaticaly the interface \ No newline at end of file +DebugBarModuleActivated=Module debugbar is activated and slows dramaticaly the interface +EXPORTS_SHARE_MODELS=Export models are share with everybody +ExportSetup=Setup of module Export \ No newline at end of file diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 1f5e1bfb45d..940307acb9b 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -58,4 +58,5 @@ TakeposNeedsCategories=TakePOS needs product categories to work OrderNotes=Order Notes CashDeskBankAccountFor=Account used for payments in NoPaimementModesDefined=No paiment mode defined in TakePOS configuration +TicketVatGrouped=Group VAT by rate in tickets AutoPrintTickets=Automatically print tickets \ No newline at end of file diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 9a75ef1a950..7931f6ec3b6 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -97,8 +97,6 @@ LocalTax2IsUsedES= IRPF is used LocalTax2IsNotUsedES= IRPF is not used LocalTax1ES=RE LocalTax2ES=IRPF -TypeLocaltax1ES=RE Type -TypeLocaltax2ES=IRPF Type WrongCustomerCode=Customer code invalid WrongSupplierCode=Vendor code invalid CustomerCodeModel=Customer code model diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index e27d9513637..54c86a1589c 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -402,6 +402,7 @@ LT1ES=RE LT2ES=IRPF LT1IN=CGST LT2IN=SGST +LT1GC=Additionnal cents VATRate=Tax Rate VATCode=Tax Rate code VATNPR=Tax Rate NPR diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index ca8cdcb3b81..44c978784a4 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -51,4 +51,5 @@ RealAmount=Montant réel CashFenceDone=Clôture de caisse faite pour la période CashDeskBankAccountFor=Compte utilisé pour les paiements en NoPaimementModesDefined=Pas de mode de paiement défini dans la configuration de TakePOS +TicketVatGrouped=Grouper la TVA par taux dans les tickets AutoPrintTickets=Imprimet les tickets automatiquement \ No newline at end of file diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 2fb58d6132c..e4b51c2429a 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -116,7 +116,7 @@ if ($resql) $newcardbutton=''; if ($user->rights->loan->write) { - $newcardbutton=''.$langs->trans('NewLoan').''; + $newcardbutton=''.$langs->trans('NewLoan').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 4813aee6dd4..d652db91e70 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -1238,7 +1238,7 @@ $head = array(); $h=0; $head[$h][0] = $_SERVER["PHP_SELF"].'?module=initmodule'; -$head[$h][1] = $langs->trans("NewModule").''; +$head[$h][1] = ''.$langs->trans("NewModule").''; $head[$h][2] = 'initmodule'; $h++; diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 35c60248ccf..8e0a8e08bff 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -350,13 +350,13 @@ print ''; $newcardbutton=''; //if ($user->rights->mymodule->creer) //{ - $newcardbutton=''.$langs->trans('New').''; + $newcardbutton=''.$langs->trans('New').''; $newcardbutton.= ''; $newcardbutton.= ''; //} //else //{ -// $newcardbutton=''.$langs->trans('New'); +// $newcardbutton=''.$langs->trans('New').'; // $newcardbutton.= ''; // $newcardbutton.= ''; //} diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 713ade2f736..498717385c2 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -245,13 +245,13 @@ print ''; $newcardbutton=''; if (! empty($user->rights->opensurvey->write)) { - $newcardbutton=''.$langs->trans('NewSurvey').''; + $newcardbutton=''.$langs->trans('NewSurvey').''; $newcardbutton.= ''; $newcardbutton.= ''; } else { - $newcardbutton=''.$langs->trans('NewSurvey'); + $newcardbutton=''.$langs->trans('NewSurvey').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index 961faf742cd..0d6a0f05174 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -176,11 +176,11 @@ if ($id > 0 || $ref) { if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) { - $morehtmlcenter.=''.$langs->trans("AddAction").''; + $morehtmlcenter.=''.$langs->trans("AddAction").''; } else { - $morehtmlcenter.=''.$langs->trans("AddAction").''; + $morehtmlcenter.=''.$langs->trans("AddAction").''; } } diff --git a/htdocs/product/list.php b/htdocs/product/list.php index d7b6fc14cf5..b02295c94e3 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -435,7 +435,7 @@ if ($resql) { $label='NewProduct'; if($type == Product::TYPE_SERVICE) $label='NewService'; - $newcardbutton=''.$langs->trans($label).''; + $newcardbutton=''.$langs->trans($label).''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 7db2dffc7db..e36312e196c 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -134,7 +134,7 @@ if ($result) $newcardbutton=''; if ($user->rights->stock->creer) { - $newcardbutton=''.$langs->trans('MenuNewWarehouse').''; + $newcardbutton=''.$langs->trans('MenuNewWarehouse').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 362359f0999..d55d8651642 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -556,7 +556,7 @@ if ($action == 'create' && $user->rights->projet->creer) print $form->textwithtooltip($text.' '.img_help(), $texthelp, 1); } else print $text; - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; print ''; } diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 02bf2679b1b..5786b390a09 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -378,7 +378,7 @@ class Project extends CommonObject if (file_exists($olddir)) { include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - $res=dol_move($olddir, $newdir); + $res=@rename($olddir, $newdir); if (! $res) { $langs->load("errors"); diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 62680a973bd..0169d1d9018 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -776,9 +776,9 @@ foreach ($listofreferent as $key => $value) if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew) { $addform.='
'; - if ($testnew) $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).' '; + if ($testnew) $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { - $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).' '; + $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; } $addform.='
'; } diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index d9a9cc37ed8..18bb2931823 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -198,16 +198,16 @@ if ($user->rights->projet->all->creer || $user->rights->projet->creer) { if ($object->public || $userWrite > 0) { - $linktocreatetask = ''.$langs->trans('AddTask').''; + $linktocreatetask = ''.$langs->trans('AddTask').''; } else { - $linktocreatetask = ''.$langs->trans('AddTask').''; + $linktocreatetask = ''.$langs->trans('AddTask').''; } } else { - $linktocreatetask = ''.$langs->trans('AddTask').''; + $linktocreatetask = ''.$langs->trans('AddTask').''; } $linktolist=''.$langs->trans("GoToListOfTasks").''; diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index 040710b4136..eb6498a220f 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -163,7 +163,7 @@ if (! empty($conf->agenda->enabled)) { if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) { - $morehtmlcenter.=''.$langs->trans("AddAction").''; + $morehtmlcenter.=''.$langs->trans("AddAction").''; $morehtmlcenter.=''; $morehtmlcenter.=''; } diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index c6daff2068b..7a2216df97f 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -452,7 +452,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->projet->creer) { - $newcardbutton = ''.$langs->trans('NewProject').''; + $newcardbutton = ''.$langs->trans('NewProject').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 166d224d1be..915ac8b9bd4 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -591,16 +591,16 @@ elseif ($id > 0 || ! empty($ref)) { if ($object->public || $userWrite > 0) { - $linktocreatetask = ''.$langs->trans('AddTask').''; + $linktocreatetask = ''.$langs->trans('AddTask').''; } else { - $linktocreatetask = ''.$langs->trans('AddTask').''; + $linktocreatetask = ''.$langs->trans('AddTask').''; } } else { - $linktocreatetask = ''.$langs->trans('AddTask').''; + $linktocreatetask = ''.$langs->trans('AddTask').''; } diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 066aebdde6a..2b2055fcd46 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -399,7 +399,7 @@ $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; if ($user->rights->projet->creer) { - $newcardbutton = ''.$langs->trans('NewTask').''; + $newcardbutton = ''.$langs->trans('NewTask').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index ba06a8ba49e..4f0567c51f3 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -581,22 +581,22 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) if (! empty($projectidforalltimes)) // We are on tab 'Time Spent' of project { $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject?'&withproject=1':''); - $linktocreatetime = ''.$langs->trans('AddTimeSpent').''; + $linktocreatetime = ''.$langs->trans('AddTimeSpent').''; } else // We are on tab 'Time Spent' of task { $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject?'&withproject=1':''); - $linktocreatetime = ''.$langs->trans('AddTimeSpent').''; + $linktocreatetime = ''.$langs->trans('AddTimeSpent').''; } } else { - $linktocreatetime = ''.$langs->trans('AddTime').''; + $linktocreatetime = ''.$langs->trans('AddTime').''; } } else { - $linktocreatetime = ''.$langs->trans('AddTime').''; + $linktocreatetime = ''.$langs->trans('AddTime').''; } //} } diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index d37509bb70f..7cbd77dd4da 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -805,7 +805,7 @@ if ($action == 'create') print '
'; print ''; print ''; } diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 800c5edcb06..45cf1e9d997 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -197,7 +197,7 @@ if($ret == -1) { $newcardbutton=''; if ($user->rights->resource->write) { - $newcardbutton=''.$langs->trans('MenuResourceAdd').''; + $newcardbutton=''.$langs->trans('MenuResourceAdd').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 44b4097eff7..18e1890c485 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -162,7 +162,7 @@ if ($socid > 0) { if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) { - $newcardbutton.=''.$langs->trans("AddAction").''; + $newcardbutton.=''.$langs->trans("AddAction").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index d74681d3118..69f76cacab8 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2348,7 +2348,7 @@ else print ''; print ''; print ''; - print ''; + print ''; if($action == 'editRE') { print ''; + print ''; if($action == 'editIRPF'){ print ''; + print ''; if($action == 'editRE'){ print ''; + print ''; if($action == 'editIRPF'){ print ''; } print '' . "\n"; @@ -1165,7 +1165,7 @@ if ($action == 'create') print ''; print ''; diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index e6dd96d3641..249620b5f53 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -388,7 +388,7 @@ if ($resql) $newcardbutton=''; if($user->rights->supplier_proposal->creer) { - $newcardbutton=''.$langs->trans('NewAskPrice').''; + $newcardbutton=''.$langs->trans('NewAskPrice').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 1a9329e972f..9d13cb0e882 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -75,6 +75,7 @@ if (GETPOST('action', 'alpha') == 'set') $res = dolibarr_set_const($db, "TAKEPOSCONNECTOR", GETPOST('TAKEPOSCONNECTOR', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_BAR_RESTAURANT", GETPOST('TAKEPOS_BAR_RESTAURANT', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_TICKET_VAT_GROUPPED", GETPOST('TAKEPOS_TICKET_VAT_GROUPPED', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_ORDER_NOTES", GETPOST('TAKEPOS_ORDER_NOTES', 'alpha'), 'chaine', 0, '', $conf->entity); @@ -168,6 +169,7 @@ if ($conf->global->TAKEPOSCONNECTOR){ print ''; } + // Bar Restaurant mode print ''; } +print '\n"; + // Payment numpad print ' +global->TAKEPOS_TICKET_VAT_GROUPPED):?> +lines as $line) + { + if(!array_key_exists($line->tva_tx, $vat_groups)){ + $vat_groups[$line->tva_tx] = 0; + } + $vat_groups[$line->tva_tx] += $line->total_tva; + } + foreach($vat_groups as $key => $val){ + ?> + + + + + + - + + - +
'; $arrayofoperators=array('0'=>'','='=>'=','<='=>'<=','>='=>'>='); - print $form->selectarray('search_op2df', $arrayofoperators, $search_op2df, 0); + print $form->selectarray('search_op2df', $arrayofoperators, $search_op2df, 0, 0, 0, '', 0, 0, 0, '', 'maxwidth50imp'); print '
'; - print $formother->select_month($search_dfmonth, 'search_dfmonth', 1, 0, 'valignmiddle'); + print $formother->select_month($search_dfmonth, 'search_dfmonth', 1, 0); print ' '; - $formother->select_year($search_dfyear, 'search_dfyear', 1, 20, 5, 0, 0, '', 'valignmiddle'); + $formother->select_year($search_dfyear, 'search_dfyear', 1, 20, 5, 0, 0, ''); print '
".$donationstatic->getNomUrl(1)."
' . $langs->trans("Project") . ''; $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0); - print '   id).'">' . $langs->trans("AddProject") . ' '; + print '   id).'">' . $langs->trans("AddProject") . ''; print '
' . $langs->trans('Project') . ''; $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS)?$societe->id:-1), $projectid, 'projectid', 0, 0, 1, 1); - print '   id).'">' . $langs->trans("AddProject") . ' '; + print '   id).'">' . $langs->trans("AddProject") . ''; print '
' . $langs->trans("Project") . ''; $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0); - print '   id).'">' . $langs->trans("AddProject") . ' '; + print '   id).'">' . $langs->trans("AddProject") . ''; print '
'.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).' id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'
'.$langs->transcountry("Localtax1", $mysoc->country_code).' id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).''; @@ -2366,7 +2366,7 @@ else print ''; print ''; print ''; - print '
'.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'
'.$langs->transcountry("Localtax2", $mysoc->country_code).'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).''; $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); @@ -2387,7 +2387,7 @@ else print ''; print ''; print ''; - print '
'.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'
'.$langs->transcountry("Localtax1", $mysoc->country_code).'id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).''; $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); @@ -2409,7 +2409,7 @@ else print ''; print ''; print ''; - print '
'.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).' id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'
'.$langs->transcountry("Localtax2", $mysoc->country_code).' id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).''; $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 7e106f387ae..c716604fd7c 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -558,7 +558,7 @@ if ($user->rights->societe->creer) if($type == 'f') $label='NewSupplier'; } - $newcardbutton = ''.$langs->trans($label).''; + $newcardbutton = ''.$langs->trans($label).''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index ef1c169c768..f928658db3e 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -800,7 +800,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' $morehtmlright=''; if (! empty($conf->global->STRIPE_ALLOW_LOCAL_CARD)) { - $morehtmlright=''.$langs->trans("Add").' '; + $morehtmlright=''.$langs->trans("Add").''; } print load_fiche_titre($langs->trans('StripePaymentModes').($stripeacc?' (Stripe connection with StripeConnect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)'), $morehtmlright, ''); @@ -1090,7 +1090,7 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' // List of bank accounts print '
'; - $morehtmlright=''.$langs->trans("Add").' '; + $morehtmlright=''.$langs->trans("Add").''; print load_fiche_titre($langs->trans("BankAccounts"), $morehtmlright, ''); diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 609cb8d4b90..75ca2b0fcd5 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -224,11 +224,11 @@ dol_fiche_end(); $newcardbutton = ''; if (! empty($conf->website->enabled)) { if (! empty($user->rights->societe->lire)) { - $newcardbutton .= '' . $langs->trans("AddWebsiteAccount").''; + $newcardbutton .= '' . $langs->trans("AddWebsiteAccount").''; $newcardbutton.= ''; $newcardbutton.= ''; } else { - $newcardbutton .= '' . $langs->trans("AddAction"); + $newcardbutton .= ''.$langs->trans("AddAction").''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 684208eb1b3..c87411cfb83 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -932,12 +932,12 @@ if (empty($reshook)) $object->setProject(GETPOST('projectid'), 'int'); } - // Delai de livraison + // Delivery delay elseif ($action == 'setavailability' && $user->rights->supplier_proposal->creer) { $result = $object->availability($_POST['availability_id']); } - // Conditions de reglement + // Terms of payments elseif ($action == 'setconditions' && $user->rights->supplier_proposal->creer) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } @@ -950,7 +950,7 @@ if (empty($reshook)) $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); } - // Mode de reglement + // Payment mode elseif ($action == 'setmode' && $user->rights->supplier_proposal->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } @@ -1084,7 +1084,7 @@ if ($action == 'create') } else { print '
'; print $form->select_company('', 'socid', 's.fournisseur = 1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); - print ' '.$langs->trans("AddThirdParty").' '; + print ' '.$langs->trans("AddThirdParty").''; print '
' . $langs->trans("Project") . ''; $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1); - print '   id).'">' . $langs->trans("AddProject") . ' '; + print '   id).'">' . $langs->trans("AddProject") . ''; print '
'; print 'Bar Restaurant'; @@ -189,6 +191,12 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOSCONNECTOR){ print '
'; +print $langs->trans('TicketVatGrouped'); +print ''; +print $form->selectyesno("TAKEPOS_TICKET_VAT_GROUPPED", $conf->global->TAKEPOS_TICKET_VAT_GROUPPED, 1); +print "
'; print $langs->trans("Paymentnumpad"); diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 1610dbb8c59..fb23120623a 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -103,11 +103,32 @@ print $object->ref; trans("TotalHT");?> total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>
trans("VAT").' '.vatrate($key, 1);?>currency)."\n";?>
trans("TotalVAT").''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>trans("TotalVAT").''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>
trans("TotalTTC").''.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>trans("TotalTTC").''.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n";?>
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index ffaa4711687..2e8d6bf4308 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1864,12 +1864,12 @@ div.login_block_other { display: inline-block; clear: ; } -div.login_block_other { padding-top: 0; text-align: right; } +div.login_block_other { padding-top: 0; text-align: right; margin-right: 8px; } + .login_block_elem { float: right; vertical-align: top; padding: 0px 3px 0px 4px !important; - height: 16px; line-height: 50px; height: 50px; } @@ -5743,6 +5743,10 @@ div.tabsElem a.tab { min-width: auto; font-size: 12px; } + + .text-plus-circle { + display: none; + } } rights->ticket->write) { - $newcardbutton = '' . $langs->trans('NewTicket').''; + $newcardbutton = '' . $langs->trans('NewTicket').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index 346b82c825c..ce1caf8762a 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -143,7 +143,7 @@ if ($resql) $newcardbutton=''; if ($caneditperms) { - $newcardbutton=''.$langs->trans('NewGroup').''; + $newcardbutton=''.$langs->trans('NewGroup').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index 3d590351dfe..b7c015e7146 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -147,7 +147,7 @@ $param="search_statut=".urlencode($search_statut); $newcardbutton=''; if ($canadduser) { - $newcardbutton = ''.$langs->trans('NewUser').''; + $newcardbutton = ''.$langs->trans('NewUser').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 59ef901ddcd..f3c00565f51 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -290,7 +290,7 @@ $text = $langs->trans("ListOfUsers"); $newcardbutton=''; if ($canadduser) { - $newcardbutton=''.$langs->trans('NewUser').''; + $newcardbutton=''.$langs->trans('NewUser').''; $newcardbutton.= ''; $newcardbutton.= ''; } diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index 481640d0daa..c25796f4b67 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -59,7 +59,7 @@ llxHeader('', $title); $newcardbutton=''; if ($user->rights->produit->creer) { - $newcardbutton=''.$langs->trans('Create').''; + $newcardbutton=''.$langs->trans('Create').''; $newcardbutton.= ''; $newcardbutton.= ''; }