diff --git a/ChangeLog b/ChangeLog index 0de3ed5df3a..f33c02b8d18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,14 +22,15 @@ Following changes may create regressions for some external modules, but were nec * Some REST API to access setup features, like dictionaries (country, town, extrafields, ...) were moved into a common API "/setup". * The REST API /documents were renamed into /documents/download and /documents/upload. -* Page bank/index.php and bank/bankentries.php were renamed into bank/list.php and bank/bankentries_list.php to - follow page naming conventions (so default filter/sort order features can also work). +* Page bank/index.php, bank/bankentries.php and comm/actions/listactions.php were renamed into + bank/list.php, bank/bankentries_list.php and comm/actions/list.php to follow page naming + conventions (so default filter/sort order features can also work). * The trigger ORDER_SUPPLIER_STATUS_ONPROCESS was renamed into ORDER_SUPPLIER_STATUS_ORDERED. * The trigger ORDER_SUPPLIER_STATUS_RECEIVED_ALL was renamed into ORDER_SUPPLIER_STATUS_RECEIVED_COMPLETELY. * The parameter note into method cloture() is added at end of private note (previously in v6, it replaced). * The parameter $user is now mandatory for method createFromOrder and createFromPropal. * Removed js library 'fileupload' that was not used by core code. - +* IE8 and earlier and Firefox 12 and earlier (2012) are no more supported. ***** ChangeLog for 6.0.3 compared to 6.0.2 ***** FIX: #7211 Update qty dispatched on qty change diff --git a/build/exe/doliwamp/Languages/MyEnglish.isl b/build/exe/doliwamp/Languages/MyEnglish.isl index 6e70f3c12f3..11d2e4456bd 100644 --- a/build/exe/doliwamp/Languages/MyEnglish.isl +++ b/build/exe/doliwamp/Languages/MyEnglish.isl @@ -43,3 +43,5 @@ DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by new Dolibarr version OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with new Dolibarr version +DLLMissing=The "Visual C++ Redistributable for Visual Studio 2012" component is missing. Please install the 32-bit version (vcredit_x86.exe) first from https://www.microsoft.com/en-us/download/details.aspx?id=30679 and restart DoliWamp installation/upgrade. +ContinueAnyway=Continue anyway (install process may fails without this prerequisite) diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index fbd821b367c..7dcb8c738bd 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -202,10 +202,30 @@ var value: String; function InitializeSetup(): Boolean; begin Result := MsgBox(CustomMessage('YouWillInstallDoliWamp')+#13#13+CustomMessage('ThisAssistantInstallOrUpgrade')+#13#13+CustomMessage('IfYouHaveTechnicalKnowledge')+#13#13+CustomMessage('ButIfYouLook')+#13#13+CustomMessage('DoYouWantToStart'), mbConfirmation, MB_YESNO) = IDYES; + + if Result then + begin + + //---------------------------------------------- + // Test if msvcr110 DLL has been installed + //---------------------------------------------- + + if not FileExists ('c:/windows/system32/msvcr110.dll') and not FileExists ('c:/windows/sysWOW64/msvcr110.dll') and not FileExists ('c:/winnt/system32/msvcr110.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr110.dll') then + begin + // TODO - offer to install the component by opening the URL in the default browser, abort installation if user doesn't accept + Result := MsgBox(CustomMessage('DLLMissing')+#13#13+CustomMessage('ContinueAnyway'), mbConfirmation, MB_YESNO) = IDYES; + + end; + // Pb seems similar with msvcp110.dll + //vcredist_x64.exe + + end; + end; procedure InitializeWizard(); begin + //version des applis, a modifier pour chaque version de WampServer 2 apacheVersion := '2.4.9'; phpVersion := '5.5.12' ; @@ -217,6 +237,7 @@ begin mysqlPort := '3306'; newPassword := 'changeme'; + firstinstall := true; @@ -344,18 +365,6 @@ begin exedirold := pathWithSlashes+'/bin/mysql/mysql5.0.45'; exedirnew := pathWithSlashes+'/bin/mysql/mysql5.0.45'; - - //---------------------------------------------- - // Test if msvcr110 DLL has been installed - //---------------------------------------------- - - if not FileExists ('c:/windows/system32/msvcr110.dll') and not FileExists ('c:/windows/sysWOW64/msvcr110.dll') and not FileExists ('c:/winnt/system32/msvcr110.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr110.dll') then - begin - // TODO - offer to install the component by opening the URL in the default browser, abort installation if user doesn't accept - MsgBox('The "Visual C++ Redistributable for Visual Studio 2012" component is missing. Please install the 32-bit version (vcredit_x86.exe) first from http://www.microsoft.com/en-us/download/details.aspx?id=30679 and restart DoliWamp installation/upgrade.',mbInformation,MB_OK); - end; - // Pb seems similar with msvcp110.dll - //vcredist_x64.exe // If we have a new database version, we should only copy old my.ini file into new directory diff --git a/build/exe/doliwamp/index.php.install b/build/exe/doliwamp/index.php.install index 700f0707de2..1c657b35977 100644 --- a/build/exe/doliwamp/index.php.install +++ b/build/exe/doliwamp/index.php.install @@ -535,7 +535,7 @@ a:hover {
  • {$langues[$langue]['autreLangue1']} - {$langues[$langue]['autreLangue2']}


  • -
  • Provided by NLTechno
  • +
  • Provided by NLTechno

  • @@ -580,7 +580,7 @@ a:hover { diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index 945e7d36ca7..fa84aedc26a 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -105,7 +105,7 @@ JQUERYFILETREE: RESTLER: -------- -* Add 2 lines into function +* Add 2 lines into file AutoLoader.php to complete function private function alias($className, $currentClass) { ... diff --git a/doc/images/dolibarr_screenshot1_1680x1050.png b/doc/images/dolibarr_screenshot1_1680x1050.png new file mode 100644 index 00000000000..46b6367f784 Binary files /dev/null and b/doc/images/dolibarr_screenshot1_1680x1050.png differ diff --git a/doc/images/dolibarr_screenshot4_1680x1050.png b/doc/images/dolibarr_screenshot4_1680x1050.png new file mode 100644 index 00000000000..afb2828b08a Binary files /dev/null and b/doc/images/dolibarr_screenshot4_1680x1050.png differ diff --git a/doc/images/dolibarr_screenshot9_1680x1050.png b/doc/images/dolibarr_screenshot9_1680x1050.png new file mode 100644 index 00000000000..7708245441a Binary files /dev/null and b/doc/images/dolibarr_screenshot9_1680x1050.png differ diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 880661edbf5..dfbc64bbb65 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -302,7 +302,7 @@ if ($result) { //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); - //if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1); @@ -319,6 +319,12 @@ if ($result) { print $langs->trans("DescVentilTodoCustomer") . '

    '; + /*$topicmail="Information"; + $modelmail="project"; + $objecttmp=new Project($db); + $trackid='prj'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';*/ + if ($msg) print $msg.'
    '; $moreforfilter = ''; diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 35460f6d48f..dc8229768d4 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -266,7 +266,7 @@ if ($result) { //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); - //if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1); @@ -284,6 +284,12 @@ if ($result) { print $langs->trans("DescVentilTodoExpenseReport") . '

    '; + /*$topicmail="Information"; + $modelmail="project"; + $objecttmp=new Project($db); + $trackid='prj'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';*/ + if ($msg) print $msg.'
    '; $moreforfilter = ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index f63e0a03d4e..076b0301b74 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -298,7 +298,7 @@ if ($result) { //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); - //if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1); @@ -315,6 +315,12 @@ if ($result) { print $langs->trans("DescVentilTodoCustomer") . '

    '; + /*$topicmail="Information"; + $modelmail="project"; + $objecttmp=new Project($db); + $trackid='prj'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';*/ + if ($msg) print $msg.'
    '; $moreforfilter = ''; diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 1228dc92bf9..61cb960f05c 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -168,7 +168,7 @@ if ($object->id > 0) $filters=array(); $filters['search_agenda_label']=$search_agenda_label; - // TODO Replace this with same code than into listactions.php + // TODO Replace this with same code than into list.php show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder); } } diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 397be6ee8da..2f13f722719 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -22,6 +22,8 @@ * \brief File of class to manage subscriptions of foundation members */ +//namespace DolibarrMember; + require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; @@ -265,14 +267,16 @@ class Subscription extends CommonObject $result=''; $label=$langs->trans("ShowSubscription").': '.$this->ref; - $link = ''; + $linkstart = ''; $linkend=''; $picto='payment'; - if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); - if ($withpicto && $withpicto != 2) $result.=' '; - $result.=$link.$this->ref.$linkend; + $result .= $linkstart; + if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1); + if ($withpicto != 2) $result.= $this->ref; + $result .= $linkend; + return $result; } diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 4d699c4866d..67204f690e0 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -355,8 +355,8 @@ $arrayofmassactions = array( // 'presend'=>$langs->trans("SendByMail"), // 'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->adherent->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); -//if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); +if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); print '
    '; @@ -371,6 +371,12 @@ print ''; print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit); +$topicmail="Information"; +$modelmail="member"; +$objecttmp=new Adherent($db); +$trackid='mem'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + if ($sall) { foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index e3b3d1ff3ee..6f6bd073f05 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -834,13 +834,15 @@ if ($rowid > 0) print "\n"; $accountstatic=new Account($db); - + while ($i < $num) { $objp = $db->fetch_object($result); - print ''; + $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; + + print ''; print ''.$subscriptionstatic->getNomUrl(1).''; print ''.dol_print_date($db->jdate($objp->datec),'dayhour')."\n"; print ''.dol_print_date($db->jdate($objp->dateh),'day')."\n"; @@ -885,18 +887,21 @@ if ($rowid > 0) } - // Shon online payment link - $useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled)); - - if ($useonlinepayment) + if (($action != 'addsubscription' && $action != 'create_thirdparty')) { - print '
    '; + // Shon online payment link + $useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled)); - require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; - print showOnlinePaymentUrl('membersubscription', $object->ref); + if ($useonlinepayment) + { + print '
    '; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; + print showOnlinePaymentUrl('membersubscription', $object->ref); + print '
    '; + } } - /* * Add new subscription form */ diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 7dfad296beb..1ed0b9a5c50 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -177,8 +177,8 @@ if ($result) //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); - if ($user->rights->adherent->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); - //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); + if ($user->rights->adherent->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); + if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); print ''; @@ -193,6 +193,12 @@ if ($result) print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit); + $topicmail="Information"; + $modelmail="subscription"; + $objecttmp=new Subscription($db); + $trackid='sub'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + if ($sall) { print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index f8ac87fcb3e..eb1efd3211b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -80,7 +80,10 @@ $pageprev = $page - 1; $pagenext = $page + 1; $search_country_id = GETPOST('search_country_id','int'); -if($search_country_id == '') $search_country_id = $mysoc->country_id; +if ($search_country_id == '' && ($id == 2 || $id == 3 || $id == 10)) // Not a so good idea to force on current country for all dictionaries. Some tables have entries that are for all countries, we must be able to see them, so this is done for dedicated dictionaries only. +{ + $search_country_id = $mysoc->country_id; +} $search_code = GETPOST('search_code','alpha'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context @@ -90,7 +93,7 @@ $hookmanager->initHooks(array('admin')); // Put here declaration of dictionaries properties // Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this. -$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,17,35,36,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,26,0,); +$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,24,28,17,35,36,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,26,0,); // Name of SQL tables of dictionaries $tabname=array(); @@ -282,6 +285,8 @@ $tabfield[29]= "code,label,percent,position"; $tabfield[30]= "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y"; //$tabfield[31]= "pcg_version,label"; //$tabfield[32]= "code,label,range_account,sens,category_type,formula,position,country_id,country"; +$tabfield[33]= "code,label"; +$tabfield[34]= "code,label"; $tabfield[35]= "label"; $tabfield[36]= "range_ik,fk_c_exp_tax_cat"; @@ -1010,6 +1015,11 @@ if ($id) $sql.=$db->plimit($listlimit+1,$offset); //print $sql; + if (empty($tabfield[$id])) + { + dol_print_error($db, 'The table with id '.$id.' has no array tabfield defined'); + exit; + } $fieldlist=explode(',',$tabfield[$id]); print ''; @@ -1393,6 +1403,7 @@ if ($id) foreach ($fieldlist as $field => $value) { + //var_dump($fieldlist); $showfield=1; $align="left"; $valuetoshow=$obj->{$fieldlist[$field]}; @@ -1750,7 +1761,7 @@ $db->close(); * @param Object $obj If we show a particular record, obj is filled with record fields * @param string $tabname Name of SQL table * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered - * @return string '' or value of entity into table + * @return string '' or value of entity into table */ function fieldList($fieldlist, $obj='', $tabname='', $context='') { diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index c0d4d54eac4..41485e19fc3 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -317,7 +317,7 @@ $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->monmodule->delete) $arrayofmassactions['delete']=$langs->trans("Delete"); +if ($user->rights->monmodule->delete) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); @@ -333,6 +333,12 @@ print ''; //print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit); +$topicmail="Information"; +//$modelmail="subscription"; +$objecttmp=new EmailSenderProfile($db); +//$trackid='sub'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + $moreforfilter = ''; /*$moreforfilter.='
    '; $moreforfilter.= $langs->trans('MyFilter') . ': '; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 5daaca5e29e..9d0c87cd424 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -258,7 +258,7 @@ print ''."\n"; print '  => '.$langs->trans("ClientHour").''.dol_print_date(dol_now(),'dayhour','tzuser').''."\n"; $filesystemencoding=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 -print ''.$langs->trans("File encoding").' (php.ini unicode.filesystem_encoding)'.$filesystemencoding.''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php +print ''.$langs->trans("File encoding").' (php.ini unicode.filesystem_encoding)'.$filesystemencoding.''."\n"; $tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 24876a0a8fb..25ddfd8c1f8 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -114,10 +114,13 @@ switch($action) { if (count($prodcustprice->lines) > 0) { - $pu_ht = price($prodcustprice->lines [0]->price); - $pu_ttc = price($prodcustprice->lines [0]->price_ttc); - $price_base_type = $prodcustprice->lines [0]->price_base_type; - $tva_tx = $prodcustprice->lines [0]->tva_tx; + $pu_ht = price($prodcustprice->lines[0]->price); + $pu_ttc = price($prodcustprice->lines[0]->price_ttc); + $price_base_type = $prodcustprice->lines[0]->price_base_type; + $tva_tx = $prodcustprice->lines[0]->tva_tx; + if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) $tva_npr=0; } } else diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 78c96ff3610..f306b9329a1 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1198,7 +1198,7 @@ if ($id > 0) } $linkback =img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); - $linkback.= ''.$langs->trans("BackToList").''; + $linkback.= ''.$langs->trans("BackToList").''; // Link to other agenda views $out=''; @@ -1324,6 +1324,8 @@ if ($id > 0) print '
    '; if ($object->datep != $object->datef && in_array($user->id,array_keys($listofuserid))) { + //var_dump($object->userassigned); + //var_dump($listofuserid); print '
    '; print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody print '
    '; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index a66a4635281..39de3a68fb4 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -225,11 +225,11 @@ class ActionComm extends CommonObject if ($this->elementtype=='commande') $this->elementtype='order'; if ($this->elementtype=='contrat') $this->elementtype='contract'; - if (! is_array($this->userassigned) && ! empty($this->userassigned)) // For backward compatibility + if (! is_array($this->userassigned) && ! empty($this->userassigned)) // For backward compatibility when userassigned was an int instead fo array { $tmpid=$this->userassigned; $this->userassigned=array(); - $this->userassigned[$tmpid]=array('id'=>$tmpid); + $this->userassigned[$tmpid]=array('id'=>$tmpid, 'transparency'=>$this->transparency); } if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated @@ -240,7 +240,7 @@ class ActionComm extends CommonObject // Be sure assigned user is defined as an array of array('id'=>,'mandatory'=>,...). if (empty($this->userassigned) || count($this->userassigned) == 0 || ! is_array($this->userassigned)) - $this->userassigned = array($userownerid=>array('id'=>$userownerid)); + $this->userassigned = array($userownerid=>array('id'=>$userownerid, 'transparency'=>$this->transparency)); if (! $this->type_id || ! $this->type_code) { @@ -943,7 +943,7 @@ class ActionComm extends CommonObject $response = new WorkboardResponse(); $response->warning_delay = $conf->agenda->warning_delay/60/60/24; $response->label = $langs->trans("ActionsToDo"); - $response->url = DOL_URL_ROOT.'/comm/action/listactions.php?status=todo&mainmenu=agenda'; + $response->url = DOL_URL_ROOT.'/comm/action/list.php?status=todo&mainmenu=agenda'; if ($user->rights->agenda->allactions->read) $response->url.='&filtert=-1'; $response->img = img_object('',"action",'class="inline-block valigntextmiddle"'); } diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 981ae1025cf..3a3112bbc9c 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -124,7 +124,7 @@ if ($object->id > 0) dol_fiche_head($head, 'documents', $langs->trans("Action"), -1, 'action'); $linkback = img_picto($langs->trans("BackToList"),'object_list','class="hideonsmartphone pictoactionview"'); - $linkback.= ''.$langs->trans("BackToList").''; + $linkback.= ''.$langs->trans("BackToList").''; // Link to other agenda views $out=''; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 431ac1b5569..eb505228b3f 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -138,7 +138,7 @@ if (GETPOST("viewlist") || $action == 'show_list') } } //print $param; - header("Location: ".DOL_URL_ROOT.'/comm/action/listactions.php?'.$param); + header("Location: ".DOL_URL_ROOT.'/comm/action/list.php?'.$param); exit; } @@ -392,7 +392,7 @@ if (! empty($conf->use_javascript_ajax)) // If javascript on $s.='' . "\n"; // Local calendar - $s.='
    ' . $langs->trans("LocalAgenda").'  
    '; + $s.='
    ' . $langs->trans("LocalAgenda").'  
    '; // External calendars if (is_array($showextcals) && count($showextcals) > 0) @@ -409,12 +409,12 @@ if (! empty($conf->use_javascript_ajax)) // If javascript on foreach ($showextcals as $val) { $htmlname = md5($val['name']); - $s.='
    ' . $val['name'] . '  
    '; + $s.='
    ' . $val['name'] . '  
    '; } } // Birthdays - $s.='
    '.$langs->trans("AgendaShowBirthdayEvents").'  
    '; + $s.='
    '.$langs->trans("AgendaShowBirthdayEvents").'  
    '; // Calendars from hooks $parameters=array(); $object=null; @@ -1375,7 +1375,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print '>'; print 'global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= $db->plimit($limit + 1, $offset); //print $sql; -dol_syslog("comm/action/listactions.php", LOG_DEBUG); +dol_syslog("comm/action/list.php", LOG_DEBUG); $resql=$db->query($sql); if ($resql) { diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index b10ab8dc05b..8a68ba1bd86 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -724,7 +724,7 @@ jQuery(document).ready(function() { else if (ids.indexOf(",") > -1) /* There is several events */ { /* alert(\'several events\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; + url = "'.DOL_URL_ROOT.'/comm/action/list.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; window.location.href = url; } else /* One event */ diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 05eba093cfd..188d2e6296f 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -839,7 +839,7 @@ jQuery(document).ready(function() { else if (ids.indexOf(",") > -1) /* There is several events */ { /* alert(\'several events\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; + url = "'.DOL_URL_ROOT.'/comm/action/list.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; window.location.href = url; } else /* One event */ diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index a15ed888a6e..85ba6f56981 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -808,6 +808,9 @@ if (empty($reshook)) $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx . ' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx); + if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) $tva_npr=0; } } } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 54ff5e1afc0..f212b790e3d 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -364,42 +364,42 @@ class Propal extends CommonObject } } - /** - * Add a proposal line into database (linked to product/service or not) - * The parameters are already supposed to be appropriate and with final values to the call - * of this method. Also, for the VAT rate, it must have already been defined - * by whose calling the method get_default_tva (societe_vendeuse, societe_acheteuse, '' product) - * and desc must already have the right value (it's up to the caller to manage multilanguage) - * - * @param string $desc Description de la ligne - * @param float $pu_ht Prix unitaire - * @param float $qty Quantite - * @param float $txtva Taux de tva - * @param float $txlocaltax1 Local tax 1 rate - * @param float $txlocaltax2 Local tax 2 rate - * @param int $fk_product Id du produit/service predefini - * @param float $remise_percent Pourcentage de remise de la ligne - * @param string $price_base_type HT or TTC - * @param float $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes - * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. - * @param int $rang Position of line - * @param int $special_code Special code (also used by externals modules!) - * @param int $fk_parent_line Id of parent line - * @param int $fk_fournprice Id supplier price - * @param int $pa_ht Buying price without tax - * @param string $label ??? - * @param int $date_start Start date of the line - * @param int $date_end End date of the line - * @param array $array_options extrafields array - * @param string $fk_unit Code of the unit to use. Null to use the default one - * @param string $origin 'order', ... - * @param int $origin_id Id of origin object - * @param double $pu_ht_devise Unit price in currency - * @param int $fk_remise_except Id discount if line is from a discount - * @return int >0 if OK, <0 if KO - * @see add_product - */ + /** + * Add a proposal line into database (linked to product/service or not) + * The parameters are already supposed to be appropriate and with final values to the call + * of this method. Also, for the VAT rate, it must have already been defined + * by whose calling the method get_default_tva (societe_vendeuse, societe_acheteuse, '' product) + * and desc must already have the right value (it's up to the caller to manage multilanguage) + * + * @param string $desc Description of line + * @param float $pu_ht Unit price + * @param float $qty Quantity + * @param float $txtva Force Vat rate, -1 for auto (Can contain the vat_src_code too with syntax '9.9 (CODE)') + * @param float $txlocaltax1 Local tax 1 rate (deprecated, use instead txtva with code inside) + * @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) + * @param int $fk_product Id du produit/service predefini + * @param float $remise_percent Pourcentage de remise de la ligne + * @param string $price_base_type HT or TTC + * @param float $pu_ttc Prix unitaire TTC + * @param int $info_bits Bits de type de lignes + * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. + * @param int $rang Position of line + * @param int $special_code Special code (also used by externals modules!) + * @param int $fk_parent_line Id of parent line + * @param int $fk_fournprice Id supplier price + * @param int $pa_ht Buying price without tax + * @param string $label ??? + * @param int $date_start Start date of the line + * @param int $date_end End date of the line + * @param array $array_options extrafields array + * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param string $origin 'order', ... + * @param int $origin_id Id of origin object + * @param double $pu_ht_devise Unit price in currency + * @param int $fk_remise_except Id discount if line is from a discount + * @return int >0 if OK, <0 if KO + * @see add_product + */ function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise=0, $fk_remise_except=0) { global $mysoc, $conf, $langs; @@ -1018,11 +1018,15 @@ class Propal extends CommonObject $fk_parent_line = 0; } + // Complete vat rate with code + $vatrate = $this->lines[$i]->tva_tx; + if ($this->lines[$i]->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$this->lines[$i]->vat_src_code.')'; + $result = $this->addline( $this->lines[$i]->desc, $this->lines[$i]->subprice, $this->lines[$i]->qty, - $this->lines[$i]->tva_tx, + $vatrate, $this->lines[$i]->localtax1_tx, $this->lines[$i]->localtax2_tx, $this->lines[$i]->fk_product, @@ -1234,7 +1238,6 @@ class Propal extends CommonObject if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $clonedObj->ref_client = ''; // Create clone - $result=$clonedObj->create($user); if ($result < 0) $error++; else diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 0ed67601846..0f10c730d1f 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -400,7 +400,7 @@ if ($resql) 'presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"), ); - if ($user->rights->propal->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + if ($user->rights->propal->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); @@ -417,10 +417,10 @@ if ($resql) print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); - $topicmail="SendSupplierProposalRef"; - $modelmail="supplier_proposal_send"; + $topicmail="SendProposalRef"; + $modelmail="proposal_send"; $objecttmp=new Propal($db); - $trackid='ord'.$object->id; + $trackid='pro'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($sall) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 238b677395e..bf0ee8aa993 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -761,10 +761,13 @@ if (empty($reshook)) { if (count($prodcustprice->lines) > 0) { - $pu_ht = price($prodcustprice->lines [0]->price); - $pu_ttc = price($prodcustprice->lines [0]->price_ttc); - $price_base_type = $prodcustprice->lines [0]->price_base_type; - $tva_tx = $prodcustprice->lines [0]->tva_tx; + $pu_ht = price($prodcustprice->lines[0]->price); + $pu_ttc = price($prodcustprice->lines[0]->price_ttc); + $price_base_type = $prodcustprice->lines[0]->price_base_type; + $tva_tx = $prodcustprice->lines[0]->tva_tx; + if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) $tva_npr=0; } } else diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 26674818027..73c39e756df 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -824,11 +824,15 @@ class Commande extends CommonOrder $fk_parent_line = 0; } + // Complete vat rate with code + $vatrate = $line->tva_tx; + if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')'; + $result = $this->addline( $line->desc, $line->subprice, $line->qty, - $line->tva_tx, + $vatrate, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, @@ -1215,9 +1219,9 @@ class Commande extends CommonOrder * @param string $desc Description of line * @param float $pu_ht Unit price (without tax) * @param float $qty Quantite - * @param float $txtva Taux de tva force, sinon -1 - * @param float $txlocaltax1 Local tax 1 rate - * @param float $txlocaltax2 Local tax 2 rate + * @param float $txtva Force Vat rate, -1 for auto (Can contain the vat_src_code too with syntax '9.9 (CODE)') + * @param float $txlocaltax1 Local tax 1 rate (deprecated, use instead txtva with code inside) + * @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) * @param int $fk_product Id of product * @param float $remise_percent Pourcentage de remise de la ligne * @param int $info_bits Bits de type de lignes diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b5780966a0e..c62257f7077 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -433,7 +433,7 @@ if ($resql) 'builddoc'=>$langs->trans("PDFMerge"), ); if($user->rights->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); - if ($user->rights->commande->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + if ($user->rights->commande->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 2adec26bb2b..2676b5a494c 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -573,7 +573,7 @@ if ($resql) //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); - //if ($user->rights->bank->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + //if ($user->rights->bank->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 74d1526f68b..7d40b4820d1 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -238,7 +238,7 @@ $arrayofmassactions = array( // 'presend'=>$langs->trans("SendByMail"), // 'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->banque->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); +if ($user->rights->banque->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); @@ -262,6 +262,11 @@ print ''; print_barre_liste($title,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_bank.png',0,$newcardbutton,'',$limit, 1); +$topicmail="Information"; +//$modelmail="subscription"; +$objecttmp=new Account($db); +//$trackid='sub'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($sall) { @@ -414,7 +419,7 @@ if (! empty($arrayfields['accountype']['checked'])) print_liste_field_titr if (! empty($arrayfields['b.number']['checked'])) print_liste_field_titre($arrayfields['b.number']['label'],$_SERVER["PHP_SELF"],'b.number','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['b.account_number']['checked'])) print_liste_field_titre($arrayfields['b.account_number']['label'],$_SERVER["PHP_SELF"],'b.account_number','',$param,'',$sortfield,$sortorder); if (! empty($arrayfields['b.fk_accountancy_journal']['checked'])) print_liste_field_titre($arrayfields['b.fk_accountancy_journal']['label'],$_SERVER["PHP_SELF"],'b.fk_accountancy_journal','',$param,'',$sortfield,$sortorder); -if (! empty($arrayfields['b.currency_code']['checked'])) print_liste_field_titre($arrayfields['b.currency_code']['label'],$_SERVER["PHP_SELF"],'','',$param,'align="center"',$sortfield,$sortorder); +if (! empty($arrayfields['b.currency_code']['checked'])) print_liste_field_titre($arrayfields['b.currency_code']['label'],$_SERVER["PHP_SELF"],'b.currency_code','',$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['toreconcile']['checked'])) print_liste_field_titre($arrayfields['toreconcile']['label'],$_SERVER["PHP_SELF"],'','',$param,'align="center"',$sortfield,$sortorder); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 22edcdbd925..8ac3ed81951 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1655,6 +1655,9 @@ if (empty($reshook)) $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = $prodcustprice->lines[0]->tva_tx; + if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) $tva_npr=0; } } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 9801726246b..ea92156aca8 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -583,11 +583,15 @@ class Facture extends CommonInvoice $fk_parent_line = 0; } + // Complete vat rate with code + $vatrate = $line->tva_tx; + if ($line->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$line->vat_src_code.')'; + $result = $this->addline( $line->desc, $line->subprice, $line->qty, - $line->tva_tx, + $vatrate, $line->localtax1_tx, $line->localtax2_tx, $line->fk_product, @@ -2486,8 +2490,8 @@ class Facture extends CommonInvoice * @param double $pu_ht Unit price without tax (> 0 even for credit note) * @param double $qty Quantity * @param double $txtva Force Vat rate, -1 for auto (Can contain the vat_src_code too with syntax '9.9 (CODE)') - * @param double $txlocaltax1 Local tax 1 rate (deprecated) - * @param double $txlocaltax2 Local tax 2 rate (deprecated) + * @param double $txlocaltax1 Local tax 1 rate (deprecated, use instead txtva with code inside) + * @param double $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) * @param int $fk_product Id of predefined product/service * @param double $remise_percent Percent of discount on line * @param int $date_start Date start of service diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 64e7eb3e15d..37570d0874f 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -545,6 +545,9 @@ if (empty($reshook)) $pu_ttc = price($prodcustprice->lines[0]->price_ttc); $price_base_type = $prodcustprice->lines[0]->price_base_type; $tva_tx = $prodcustprice->lines[0]->tva_tx; + if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) $tva_npr=0; } } } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 1c32ecf2716..2629fd9e349 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -592,7 +592,7 @@ if ($resql) } else { - $arrayofmassactions['delete']=$langs->trans("Delete"); + $arrayofmassactions['predelete']=$langs->trans("Delete"); } } if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index b761eb1864b..b014dd107f4 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -517,6 +517,9 @@ if (empty($reshook)) $pu_ttc = price($prodcustprice->lines [0]->price_ttc); $price_base_type = $prodcustprice->lines [0]->price_base_type; $tva_tx = $prodcustprice->lines [0]->tva_tx; + if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) $tva_npr=0; } } } diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index 45595712b68..4bf7346d7fa 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -346,6 +346,83 @@ class Contracts extends DolibarrApi return false; } + /** + * Activate a service line of a given contract + * + * @param int $id Id of contract to activate + * @param int $lineid Id of line to activate + * @param string $datestart {@from body} Date start {@type timestamp} + * @param string $dateend {@from body} Date end {@type timestamp} + * @param string $comment {@from body} Comment + * + * @url PUT {id}/lines/{lineid}/activate + * + * @return object + */ + function activateLine($id, $lineid, $datestart, $dateend = NULL, $comment = NULL) { + if(! DolibarrApiAccess::$user->rights->contrat->creer) { + throw new RestException(401); + } + + $result = $this->contract->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Contrat not found'); + } + + if( ! DolibarrApi::_checkAccessToResource('contrat',$this->contract->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $updateRes = $this->contract->active_line(DolibarrApiAccess::$user, $lineid, $datestart, $dateend, $comment); + + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + + return false; + } + + /** + * Unactivate a service line of a given contract + * + * @param int $id Id of contract to activate + * @param int $lineid Id of line to activate + * @param string $datestart {@from body} Date start {@type timestamp} + * @param string $comment {@from body} Comment + * + * @url PUT {id}/lines/{lineid}/unactivate + * + * @return object + */ + function unactivateLine($id, $lineid, $datestart, $comment = NULL) { + if(! DolibarrApiAccess::$user->rights->contrat->creer) { + throw new RestException(401); + } + + $result = $this->contract->fetch($id); + if( ! $result ) { + throw new RestException(404, 'Contrat not found'); + } + + if( ! DolibarrApi::_checkAccessToResource('contrat',$this->contract->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $request_data = (object) $request_data; + + $updateRes = $this->contract->close_line(DolibarrApiAccess::$user, $lineid, $datestart, $comment); + + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } + + return false; + } + /** * Delete a line to given contract * diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 1f39599e7ac..988a3e2d352 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -365,7 +365,7 @@ if ($resql) 'presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"), ); - if ($user->rights->contrat->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 05fd2b57e12..07120042eae 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -323,7 +323,7 @@ $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); -//if ($user->rights->contrat->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); +//if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1553c9f3e53..c73d260784d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3878,9 +3878,10 @@ abstract class CommonObject $this->tpl['description'] = ' '; } - // VAT Rate - $this->tpl['vat_rate'] = vatrate($line->tva_tx, true); - if (! empty($line->vat_src_code) && ! preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'].=' ('.$line->vat_src_code.')'; + // VAT Rate + $this->tpl['vat_rate'] = vatrate($line->tva_tx, true); + $this->tpl['vat_rate'] .= (($line->info_bits & 1) == 1) ? '*' : ''; + if (! empty($line->vat_src_code) && ! preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'].=' ('.$line->vat_src_code.')'; $this->tpl['price'] = price($line->subprice); $this->tpl['multicurrency_price'] = price($line->multicurrency_subprice); diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 049f768b549..ee49d15cfac 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -615,7 +615,10 @@ class FormFile $modelselected=$arraykeys[0]; } $out.= $form->selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', 'minwidth100'); - $out.= ajax_combobox('model'); + if ($conf->use_javascript_ajax) + { + $out.= ajax_combobox('model'); + } } else { diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 432a7bb37de..565cd4310b4 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -1023,7 +1023,11 @@ class FormOther $selectboxlist.=Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone', 0, 'hidden selected', 0, 1); if (empty($conf->use_javascript_ajax)) $selectboxlist.=' '; $selectboxlist.=''; - $selectboxlist.=ajax_combobox("boxcombo"); + if (! empty($conf->use_javascript_ajax)) + { + include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; + $selectboxlist.=ajax_combobox("boxcombo"); + } } // Javascript code for dynamic actions diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 526e6386f0f..922678a3b3a 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -239,7 +239,7 @@ function show_array_actions_to_do($max=5) print '
    '; print ''; - print ''; + print ''; print ''; $var = true; @@ -336,7 +336,7 @@ function show_array_last_actions_done($max=5) print '
    '.$langs->trans("LastActionsToDo",$max).''.$langs->trans("FullList").''.$langs->trans("FullList").'
    '; print ''; - print ''; + print ''; print ''; $var = true; $i = 0; @@ -514,7 +514,7 @@ function calendars_prepare_head($param) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/comm/action/listactions.php'.($param?'?'.$param:''); + $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php'.($param?'?'.$param:''); $head[$h][1] = $langs->trans("ViewList"); $head[$h][2] = 'cardlist'; $h++; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index ac98fa599a9..79c1b394876 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1355,7 +1355,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= if ($donetodo) { $tmp=''; - if (get_class($filterobj) == 'Societe') $tmp.=''; + if (get_class($filterobj) == 'Societe') $tmp.=''; $tmp.=($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : ''); $tmp.=($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : ''); $tmp.=($donetodo != 'todo' ? $langs->trans("ActionsDoneShort") : ''); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bc3027f5aa4..6b759c8d2cc 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5850,7 +5850,7 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb // If inline message with no format, we add it. if ((empty($conf->use_javascript_ajax) || ! empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) || $keepembedded) && ! preg_match('/
    /i',$out)) { - $divstart='
    '; + $divstart='
    '; $divend='
    '; } diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index ebd64b36a3c..90089488389 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -298,7 +298,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM print '
    '."\n"; } - if (is_array($moredata) && ! empty($moredata['searchform'])) + if (is_array($moredata) && ! empty($moredata['searchform'])) // searchform can contains select2 code or link to show old search form or link to switch on search page { print "\n"; print "\n"; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 9e88767f473..287e91947d4 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -484,7 +484,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print '
    '."\n"; } - if (is_array($moredata) && ! empty($moredata['searchform']) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + if (is_array($moredata) && ! empty($moredata['searchform'])) // searchform can contains select2 code or link to show old search form or link to switch on search page { print "\n"; print "\n"; @@ -711,7 +711,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->propal->enabled)) { $langs->load("propal"); - $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Prop"), 0, $user->rights->propale->lire, '', $mainmenu, 'propals', 100); + $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->rights->propale->lire, '', $mainmenu, 'propals', 100); $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->rights->propale->creer); $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->rights->propale->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu=="propals") $newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=0", $langs->trans("PropalsDraft"), 2, $user->rights->propale->lire); diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index d4c97deecf0..214ce91b032 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -20,9 +20,9 @@ */ /** - * \file htdocs/core/modules/import/import_csv.modules.php + * \file htdocs/core/modules/import/import_xlsx.modules.php * \ingroup import - * \brief File to load import files with CSV format + * \brief File to load import files with Excel format */ require_once DOL_DOCUMENT_ROOT .'/core/modules/import/modules_import.php'; diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index a42c3001b44..2bb01d04553 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -302,7 +302,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'List', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda', + 'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda', 'langs'=>'agenda', 'position'=>110, 'perms'=>'$user->rights->agenda->myactions->read', @@ -314,7 +314,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuToDoMyActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine', + 'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine', 'langs'=>'agenda', 'position'=>111, 'perms'=>'$user->rights->agenda->myactions->read', @@ -326,7 +326,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuDoneMyActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine', + 'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine', 'langs'=>'agenda', 'position'=>112, 'perms'=>'$user->rights->agenda->myactions->read', @@ -338,7 +338,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuToDoActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', + 'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=todo&filtert=-1', 'langs'=>'agenda', 'position'=>113, 'perms'=>'$user->rights->agenda->allactions->read', @@ -350,7 +350,7 @@ class modAgenda extends DolibarrModules 'type'=>'left', 'titre'=>'MenuDoneActions', 'mainmenu'=>'agenda', - 'url'=>'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', + 'url'=>'/comm/action/list.php?mainmenu=agenda&leftmenu=agenda&status=done&filtert=-1', 'langs'=>'agenda', 'position'=>114, 'perms'=>'$user->rights->agenda->allactions->read', diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index eb873d0e8f9..83ef016d3a9 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2017 Laurent Destailleur * * This file is a modified version of datepicker.php from phpBSM to fix some * bugs, to add new features and to dramatically increase speed. @@ -20,7 +20,7 @@ /** * \file htdocs/core/search_page.php - * \brief File to return search box + * \brief File to return a page with search boxes */ //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language @@ -78,7 +78,8 @@ if ($conf->use_javascript_ajax && 1 == 2) // select2 is ko with jmobile else { $usedbyinclude = 1; // Used into next include - include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; + $showtitlebefore = GETPOST('showtitlebefore','int'); + include DOL_DOCUMENT_ROOT.'/core/ajax/selectsearchbox.php'; $accesskeyalreadyassigned=array(); foreach($arrayresult as $key => $val) @@ -94,7 +95,7 @@ else $accesskey=$val['label'][0]; $accesskeyalreadyassigned[$accesskey]=$accesskey; } - $searchform.=printSearchForm($urlaction, $urlaction, $val['label'], 'minwidth200', $keysearch, $accesskey, $key, img_picto('',$val['img'],'', 0, 1)); + $searchform.=printSearchForm($urlaction, $urlaction, $val['label'], 'minwidth200', $keysearch, $accesskey, $key, img_picto('',$val['img'],'', 0, 1), $showtitlebefore); } } @@ -112,11 +113,9 @@ print "\n"; print "\n"; print '
    '; print ''; -//print '
    '; print '
    '."\n"; print $searchform; print '
    '."\n"; -//print '
    '; print '
    '; print "\n\n"; diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 5a394188c18..19c607b1612 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -320,7 +320,7 @@ if (! empty($conf->global->ECM_AUTO_TREE_ENABLED)) { if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { $langs->load("products"); $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>(! empty($conf->product->enabled) || ! empty($conf->service->enabled)), 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); } if (! empty($conf->societe->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); } - if (! empty($conf->propal->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Prop"), 'desc'=>$langs->trans("ECMDocsByProposals")); } + if (! empty($conf->propal->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsByProposals")); } if (! empty($conf->contrat->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsByContracts")); } if (! empty($conf->commande->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order', 'test'=>$conf->commande->enabled, 'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsByOrders")); } if (! empty($conf->facture->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); } diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index 2f5c921dc78..c52476aef02 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -104,7 +104,7 @@ $rowspan=0; $sectionauto=array(); if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>$conf->product->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); } if (! empty($conf->societe->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); } -if (! empty($conf->propal->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Prop"), 'desc'=>$langs->trans("ECMDocsByProposals")); } +if (! empty($conf->propal->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsByProposals")); } if (! empty($conf->contrat->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsByContracts")); } if (! empty($conf->commande->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order', 'test'=>$conf->commande->enabled,'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsByOrders")); } if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByOrders")); } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 0cdbb9665c6..4807564e65f 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1291,7 +1291,7 @@ class Expedition extends CommonObject $sql = "SELECT cd.rowid, cd.fk_product, cd.label as custom_label, cd.description, cd.qty as qty_asked, cd.product_type"; $sql.= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva"; - $sql.= ", cd.vat_src_code, cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.price, cd.subprice, cd.remise_percent,cd.buy_price_ht as pa_ht"; + $sql.= ", cd.vat_src_code, cd.tva_tx, cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.info_bits, cd.price, cd.subprice, cd.remise_percent,cd.buy_price_ht as pa_ht"; $sql.= ", cd.fk_multicurrency, cd.multicurrency_code, cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc"; $sql.= ", ed.rowid as line_id, ed.qty as qty_shipped, ed.fk_origin_line, ed.fk_entrepot"; $sql.= ", p.ref as product_ref, p.label as product_label, p.fk_product_type"; @@ -1389,6 +1389,7 @@ class Expedition extends CommonObject $line->tva_tx = $obj->tva_tx; $line->localtax1_tx = $obj->localtax1_tx; $line->localtax2_tx = $obj->localtax2_tx; + $line->info_bits = $obj->info_bits; $line->price = $obj->price; $line->subprice = $obj->subprice; $line->remise_percent = $obj->remise_percent; diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index a9f1e0ecde4..c1a82467e49 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -379,7 +379,7 @@ if ($resql) 'presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"), ); - if ($user->rights->expensereport->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + if ($user->rights->expensereport->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); @@ -489,7 +489,7 @@ if ($resql) $topicmail="SendExpenseReport"; $modelmail="expensereport"; $objecttmp=new ExpenseReport($db); - $trackid='int'.$object->id; + $trackid='exp'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($sall) diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index baf90355249..89ad3f77c3a 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -285,8 +285,8 @@ if ($resql) //'presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"), ); - if ($user->rights->ficheinter->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); - //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); + if ($user->rights->ficheinter->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); + if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); // Lines of title fields @@ -302,6 +302,12 @@ if ($resql) print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); + $topicmail="Information"; + $modelmail="intervention"; + $objecttmp=new Intervention($db); + $trackid='int'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + if ($sall) { foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index db947f4011f..36752c0f607 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -660,7 +660,7 @@ if ($resql) 'builddoc'=>$langs->trans("PDFMerge"), ); //if($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); - if ($user->rights->fournisseur->commande->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + if ($user->rights->fournisseur->commande->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index bdf9349763b..19c9978ecd0 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -471,7 +471,7 @@ if ($resql) //'builddoc'=>$langs->trans("PDFMerge"), ); //if($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); - if ($user->rights->fournisseur->facture->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); + if ($user->rights->fournisseur->facture->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete','createbills'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index c5b39a87681..b705d0be450 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -118,7 +118,7 @@ $arrayofmassactions = array( 'presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete"); +if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete"); if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); @@ -209,6 +209,12 @@ if ($resql) print ''; print ''; + $topicmail="Information"; + $modelmail="product"; + $objecttmp=new Product($db); + $trackid='prod'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + print '
    '.$langs->trans("LastDoneTasks",$max).''.$langs->trans("FullList").''.$langs->trans("FullList").'
    '; // Lignes des champs de filtre diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index c957ec67a5b..978fceea80e 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -386,7 +386,9 @@ if ($action == 'confirm_send') $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; - $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); + $trackid='leav'.$object->id; + + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, null, null, null, '', '', 0, 0, '', '', $trackid); // Envoi du mail $result=$mail->sendfile(); @@ -472,12 +474,14 @@ if ($action == 'confirm_valid') $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; - $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); + $trackid='leav'.$object->id; + + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, null, null, null, '', '', 0, 0, '', '', $trackid); // Envoi du mail $result=$mail->sendfile(); - if(!$result) { + if (!$result) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&error=mail&error_content='.$mail->error); exit; } @@ -547,7 +551,9 @@ if ($action == 'confirm_refuse') $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; - $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); + $trackid='leav'.$object->id; + + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, null, null, null, '', '', 0, 0, '', '', $trackid); // Envoi du mail $result=$mail->sendfile(); @@ -684,7 +690,9 @@ if ($action == 'confirm_cancel' && GETPOST('confirm') == 'yes') $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; $message.= "\n"; - $mail = new CMailFile($subject,$emailTo,$emailFrom,$message); + $trackid='leav'.$object->id; + + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, null, null, null, '', '', 0, 0, '', '', $trackid); // Envoi du mail $result=$mail->sendfile(); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 1d89bbbdd94..ac1b7370993 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -298,8 +298,8 @@ $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), //'builddoc'=>$langs->trans("PDFMerge"), ); -if ($user->rights->holiday->delete) $arrayofmassactions['delete']=$langs->trans("Delete"); -//if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); +if ($user->rights->holiday->delete) $arrayofmassactions['predelete']=$langs->trans("Delete"); +if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); $massactionbutton=$form->selectMassAction('', $arrayofmassactions); print '
    '; @@ -352,14 +352,11 @@ else //print count($holiday->holiday); print_barre_liste($langs->trans("ListeCP"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm.png', 0, '', '', $limit); - /*if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) - { - dol_fiche_head('', '', '', -1); - - showMyBalance($holiday, $user_id); - - dol_fiche_end(); - }*/ + $topicmail="Information"; + $modelmail="leaverequest"; + $objecttmp=new Holiday($db); + $trackid='leav'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; } if ($sall) diff --git a/htdocs/install/doctemplates/thirdparties/template_thirdparty.ods b/htdocs/install/doctemplates/thirdparties/template_thirdparty.ods index c715d7fb80f..bdfa6675094 100644 Binary files a/htdocs/install/doctemplates/thirdparties/template_thirdparty.ods and b/htdocs/install/doctemplates/thirdparties/template_thirdparty.ods differ diff --git a/htdocs/install/medias/README.txt b/htdocs/install/medias/README.txt new file mode 100644 index 00000000000..1572f650385 --- /dev/null +++ b/htdocs/install/medias/README.txt @@ -0,0 +1,2 @@ +# Files here are provide by Pixabay with Licence "CC0 Creative Commons" +# https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/htdocs/install/medias/background_coder.jpg b/htdocs/install/medias/background_coder.jpg new file mode 100644 index 00000000000..326d453c8f5 Binary files /dev/null and b/htdocs/install/medias/background_coder.jpg differ diff --git a/htdocs/install/doctemplates/mycompany/background_computer_coffee.jpg b/htdocs/install/medias/background_computer_coffee.jpg similarity index 100% rename from htdocs/install/doctemplates/mycompany/background_computer_coffee.jpg rename to htdocs/install/medias/background_computer_coffee.jpg diff --git a/htdocs/install/doctemplates/mycompany/background_dolibarr.jpg b/htdocs/install/medias/background_dolibarr.jpg similarity index 100% rename from htdocs/install/doctemplates/mycompany/background_dolibarr.jpg rename to htdocs/install/medias/background_dolibarr.jpg diff --git a/htdocs/install/medias/background_rough-horn.jpg b/htdocs/install/medias/background_rough-horn.jpg new file mode 100644 index 00000000000..662ac02f25f Binary files /dev/null and b/htdocs/install/medias/background_rough-horn.jpg differ diff --git a/htdocs/install/medias/background_sunset.jpg b/htdocs/install/medias/background_sunset.jpg new file mode 100644 index 00000000000..63c6100f964 Binary files /dev/null and b/htdocs/install/medias/background_sunset.jpg differ diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index e31fee63c5b..1e0388cff94 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -382,6 +382,8 @@ ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_tx d ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price double(24,8) DEFAULT NULL; ALTER TABLE llx_product_fournisseur_price_log ADD COLUMN multicurrency_price_ttc double(24,8) DEFAULT NULL; +ALTER TABLE llx_product_customer_price_log ADD COLUMN default_vat_code varchar(10); + UPDATE llx_contrat SET ref = rowid WHERE ref IS NULL OR ref = ''; ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT ''; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index a93081cd5b2..321e1dc335b 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -918,9 +918,9 @@ if ($ok && GETPOST('force_disable_of_modules_not_found','alpha')) // clean_linked_elements: Check and clean linked elements if ($ok && GETPOST('force_utf8_on_tables','alpha')) { - print '
    '; + print ''; - if ($db->type == "mysql") + if ($db->type == "mysql" || $db->type == "mysqli") { $listoftables = $db->DDLListTables($db->database_name); diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 14695f914cb..d11ac64e4c7 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -421,13 +421,15 @@ if (! $error && $db->connected && $action == "set") } // Les documents sont en dehors de htdocs car ne doivent pas pouvoir etre telecharges en passant outre l'authentification - $dir[0] = $main_data_dir."/mycompany"; - $dir[1] = $main_data_dir."/users"; - $dir[2] = $main_data_dir."/facture"; - $dir[3] = $main_data_dir."/propale"; - $dir[4] = $main_data_dir."/ficheinter"; - $dir[5] = $main_data_dir."/produit"; - $dir[6] = $main_data_dir."/doctemplates"; + $dir=array(); + $dir[] = $main_data_dir."/mycompany"; + $dir[] = $main_data_dir."/medias"; + $dir[] = $main_data_dir."/users"; + $dir[] = $main_data_dir."/facture"; + $dir[] = $main_data_dir."/propale"; + $dir[] = $main_data_dir."/ficheinter"; + $dir[] = $main_data_dir."/produit"; + $dir[] = $main_data_dir."/doctemplates"; // Boucle sur chaque repertoire de dir[] pour les creer s'ils nexistent pas $num=count($dir); @@ -455,6 +457,13 @@ if (! $error && $db->connected && $action == "set") } } + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + // Copy directory medias + $srcroot=$main_dir.'/install/medias'; + $destroot=$main_data_dir.'/medias'; + dolCopyDir($srcroot, $destroot, 0, 0); + if ($error) { print "

    *** Force page code and collation of tables into utf8 (for mysql/mariadb only)

    *** Force page code and collation of tables into utf8/utf8_unicode_ci (for mysql/mariadb only)
    ".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); @@ -467,19 +476,22 @@ if (! $error && $db->connected && $action == "set") else { //ODT templates - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $srcroot=$main_dir.'/install/doctemplates'; $destroot=$main_data_dir.'/doctemplates'; - $docs=array('contracts' => 'contract' - , 'thirdparties' => 'thirdparty' - , 'products' => 'product' - , 'proposals' => 'proposal' - , 'orders' => 'order' - , 'invoices' => 'invoice' - , 'projects' => 'project' - , 'tasks' => 'task_summary' - , 'users' => 'user' - , 'usergroups' => 'usergroups' + $docs=array( + 'contracts' => 'contract', + 'invoices' => 'invoice', + 'orders' => 'order', + 'products' => 'product', + 'projects' => 'project', + 'proposals' => 'proposal', + 'shipment' => 'shipment', + 'supplier_proposal' => 'supplier_proposal', + 'tasks' => 'task_summary', + 'thirdparties' => 'thirdparty', + 'usergroups' => 'usergroups', + 'users' => 'user', + 'usergroups' => 'usergroups', ); foreach($docs as $cursordir => $cursorfile) { @@ -516,10 +528,6 @@ if (! $error && $db->connected && $action == "set") $error+=write_conf_file($conffile); } - // Write main.inc.php and master.inc.php into documents/custom dir - //$error+=write_main_file($main_data_dir.'/custom/main.inc.php',$main_dir); - //$error+=write_master_file($main_data_dir.'/custom/master.inc.php',$main_dir); - // Create database and admin user database if (! $error) { diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 1d82364760a..36fd5135e83 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -243,9 +243,9 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 migrate_restore_missing_links($db,$langs,$conf); - migrate_directories($db,$langs,$conf,'/compta','/banque'); + migrate_rename_directories($db,$langs,$conf,'/compta','/banque'); - migrate_directories($db,$langs,$conf,'/societe','/mycompany'); + migrate_rename_directories($db,$langs,$conf,'/societe','/mycompany'); } // Script for VX (X<2.8) -> V2.8 @@ -302,7 +302,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 $beforeversionarray=explode('.','3.1.9'); if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) { - migrate_directories($db,$langs,$conf,'/rss','/externalrss'); + migrate_rename_directories($db,$langs,$conf,'/rss','/externalrss'); migrate_actioncomm_element($db,$langs,$conf); } @@ -351,7 +351,7 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 $beforeversionarray=explode('.','4.0.9'); if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0) { - migrate_directories($db,$langs,$conf,'/fckeditor','/medias'); + migrate_rename_directories($db,$langs,$conf,'/fckeditor','/medias'); } // Scripts for last version @@ -470,13 +470,20 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09 $db->commit(); $db->close(); + + // Copy directory medias + $srcroot=DOL_DOCUMENT_ROOT.'/install/medias'; + $destroot=DOL_DATA_ROOT.'/medias'; + dolCopyDir($srcroot, $destroot, 0, 0); + + // Actions for all versions (no database change, delete files and directories) migrate_delete_old_files($db, $langs, $conf); migrate_delete_old_dir($db, $langs, $conf); // Actions for all versions (no database change, create directories) dol_mkdir(DOL_DATA_ROOT.'/bank'); // Actions for all versions (no database change, rename directories) - migrate_directories($db, $langs, $conf, '/banque/bordereau', '/bank/checkdeposits'); + migrate_rename_directories($db, $langs, $conf, '/banque/bordereau', '/bank/checkdeposits'); print '

    '.$langs->trans("MigrationFinished").'
    '; } @@ -3979,13 +3986,13 @@ function migrate_remise_except_entity($db,$langs,$conf) * @param string $newname New name (relative to DOL_DATA_ROOT) * @return void */ -function migrate_directories($db,$langs,$conf,$oldname,$newname) +function migrate_rename_directories($db,$langs,$conf,$oldname,$newname) { - dolibarr_install_syslog("upgrade2::migrate_directories"); + dolibarr_install_syslog("upgrade2::migrate_rename_directories"); if (is_dir(DOL_DATA_ROOT.$oldname) && ! file_exists(DOL_DATA_ROOT.$newname)) { - dolibarr_install_syslog("upgrade2::migrate_directories move " . DOL_DATA_ROOT . $oldname . ' into ' . DOL_DATA_ROOT . $newname); + dolibarr_install_syslog("upgrade2::migrate_rename_directories move " . DOL_DATA_ROOT . $oldname . ' into ' . DOL_DATA_ROOT . $newname); @rename(DOL_DATA_ROOT.$oldname,DOL_DATA_ROOT.$newname); } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 94a7651af49..294de90d900 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -882,7 +882,7 @@ DictionaryTypeContact=Contact/Address types DictionaryEcotaxe=Ecotax (WEEE) DictionaryPaperFormat=Paper formats DictionaryFormatCards=Cards formats -DictionaryFees=Types of fees +DictionaryFees=Expense report - Types of expense report lines DictionarySendingMethods=Shipping methods DictionaryStaff=Staff DictionaryAvailability=Delivery delay @@ -896,8 +896,8 @@ DictionaryUnits=Units DictionaryProspectStatus=Prospection status DictionaryHolidayTypes=Types of leaves DictionaryOpportunityStatus=Opportunity status for project/lead -DictionaryExpenseTaxCat=Expense report categories -DictionaryExpenseTaxRange=Expense report range by category +DictionaryExpenseTaxCat=Expense report - Transportation categories +DictionaryExpenseTaxRange=Expense report - Range by transportation category SetupSaved=Setup saved SetupNotSaved=Setup not saved BackToModuleList=Back to modules list diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 9eb795ea7d1..f5e1ee8f366 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -77,7 +77,7 @@ BoxTitleLastModifiedSupplierBills=Latest %s modified supplier bills BoxTitleLatestModifiedSupplierOrders=Latest %s modified supplier orders BoxTitleLastModifiedCustomerBills=Latest %s modified customer bills BoxTitleLastModifiedCustomerOrders=Latest %s modified customer orders -BoxTitleLastModifiedPropals=Latest %s modified propals +BoxTitleLastModifiedPropals=Latest %s modified proposals ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 43b8e3a6cbb..379027b6561 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -374,6 +374,7 @@ TotalLT1IN=Total CGST TotalLT2IN=Total SGST HT=Net of tax TTC=Inc. tax +INCVATONLY=Inc. VAT INCT=Inc. all taxes VAT=Sales tax VATIN=IGST diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index 2cbbc509076..29c4fe16b64 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -4,7 +4,6 @@ Proposal=Commercial proposal ProposalShort=Proposal ProposalsDraft=Draft commercial proposals ProposalsOpened=Open commercial proposals -Prop=Commercial proposals CommercialProposal=Commercial proposal PdfCommercialProposalTitle=Commercial proposal ProposalCard=Proposal card diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 88eb244713e..62d2e23e66c 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -135,7 +135,7 @@ DateMovement=Date of movement InventoryCode=Movement or inventory code IsInPackage=Contained into package WarehouseAllowNegativeTransfer=Stock can be negative -qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse +qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse and your setup does not allow negative stocks. ShowWarehouse=Show warehouse MovementCorrectStock=Stock correction for product %s MovementTransferStock=Stock transfer of product %s into another warehouse diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 4f656cfaac5..cc7e5e507e2 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -21,6 +21,7 @@ AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container HomePage=Home Page +PageContainer=Page/container PreviewOfSiteNotYetAvailable=Preview of your website %s not yet available. You must first add a page. RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this. PageContent=Page/Contenair diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 1d049e670c9..c2cbd0a48fc 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1589,9 +1589,9 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra print "\n".''."\n".'
    '."\n"; - print "\n"; + if ($conf->browser->layout == 'phone') $conf->global->MAIN_USE_OLD_SEARCH_FORM=1; // Select into select2 is awfull on smartphone. TODO Is this still true with select2 v4 ? - if ($conf->browser->layout == 'phone') $conf->global->MAIN_USE_OLD_SEARCH_FORM=1; // Select into select2 is awfull on smartphone + print "\n"; if ($conf->use_javascript_ajax && empty($conf->global->MAIN_USE_OLD_SEARCH_FORM)) { if (! is_object($form)) $form=new Form($db); @@ -1621,7 +1621,13 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra } else $searchform=$hookmanager->resPrint; - if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_USE_OLD_SEARCH_FORM)) + // Force special value for $searchform + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) || empty($conf->use_javascript_ajax)) + { + $urltosearch=DOL_URL_ROOT.'/core/search_page.php?showtitlebefore=1'; + $searchform=''; + } + elseif ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_USE_OLD_SEARCH_FORM)) { $searchform='
    '; $searchform.=''."\n"; llxHeader($moreheadcss.$moreheadjs, $langs->trans("websiteetup"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss, '', '', ''."\n".'
    '); -print "\n".'
    '; +print "\n".''; + print ''; if ($action == 'createsite') { @@ -1156,6 +1157,7 @@ if ($action == 'edit') print ''; } +print '
    '; // Add a margin under toolbar ? $style=''; @@ -1170,12 +1172,12 @@ if (count($object->records) > 0) { // ***** Part for web sites - print '
    '; - print ''; + print '
    '; + print $langs->trans("Website").' : '; print '
    '; print '
    '; - print $langs->trans("WebSite").': '; + print ' '; print '
    '; // List of website @@ -1199,7 +1201,9 @@ if (count($object->records) > 0) $out.=''; $out.=ajax_combobox('website'); print $out; - print ''; + //print ''; + print ''; + if ($website) { @@ -1215,14 +1219,14 @@ if (count($object->records) > 0) print '   '; - print ''; + print ''; //print ''; - print ''; - print ''; + print ''; + print ''; print '   '; - print ''; + print ''; /*print ''.dol_escape_htmltag($langs->trans("MediaFiles")).''; print '