diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 69f4d27b26f..5cd4c60673b 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -50,7 +50,7 @@ RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini # set up sendmail config, to use maildev RUN echo "account default" > /etc/msmtprc RUN echo "auth off" >> /etc/msmtprc -RUN echo "port 25" >> /etc/msmtprc +RUN echo "port 1025" >> /etc/msmtprc RUN echo "host mail" >> /etc/msmtprc RUN echo "from local@localdomain.com" >> /etc/msmtprc RUN echo "domain localhost.localdomain" >> /etc/msmtprc diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml index ddcdc58560a..cc2988a67d1 100644 --- a/build/docker/docker-compose.yml +++ b/build/docker/docker-compose.yml @@ -55,8 +55,8 @@ services: mail: image: maildev/maildev ports: - - "8081:80" - - "25:25" + - "8081:1080" + - "25:1025" networks: - internal-pod - external-pod diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt index 23cb86097ee..42c9069dfcb 100644 --- a/dev/tools/codespell/codespell-lines-ignore.txt +++ b/dev/tools/codespell/codespell-lines-ignore.txt @@ -1,13 +1,18 @@ 'capture' => true, // Charge immediatly + // Save a stripe payment was done in realy life so later we will be able to force a commit on recorded payments $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut // Conversion du PDF en image png si fichier png non existant // Save a stripe payment was done in realy life so later we will be able to force a commit on recorded payments + // To make a Stripe SEPA payment request, we must have the payment mode source already saved into societe_rib and retreived with ->sepaStripe //break; // No break for sortfield and sortorder so we can cumulate fields (is it realy usefull ?) $errmsg = 'Failed to retreive paymentintent or charge from id'; $minifile = getImageFileNameForSize($fileinfo['basename'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original + $more .= '
Nam elementum nisl et mi a commodo porttitor. Morbi sit amet nisl eu arcu faucibus hendrerit vel a risus. Nam a orci mi, elementum ac arcu sit amet, fermentum pellentesque et purus. Integer maximus varius lorem, sed convallis diam accumsan sed. Etiam porttitor placerat sapien, sed eleifend a enim pulvinar faucibus semper quis ut arcu. Ut non nisl a mollis est efficitur vestibulum. Integer eget purus nec nulla mattis et accumsan ut magna libero. Morbi auctor iaculis porttitor. Sed ut magna ac risus et hendrerit scelerisque. Praesent eleifend lacus in lectus aliquam porta. Cras eu ornare dui curabitur lacinia.
GETPOST("mouvement", 'int'), + console.log("Clik on #topmenulogincompanyinfo-btn"); + console.log("Clik on #topmenuloginmoreinfo-btn"); console.log("Clik on topmenulogincompanyinfo-btn"); console.log("Clik on topmenuloginmoreinfo-btn"); console.log("chartofaccounts seleted = "+$("#chartofaccounts").val()); @@ -223,6 +237,7 @@ if (((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order")) && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) { //No diff => mean everythings is received if (empty($conf->global->PROJECT_DISABLE_UNLINK_FROM_OVERVIEW) || $user->admin) { // PROJECT_DISABLE_UNLINK_FROM_OVERVIEW is empty by defaut, so this test true + if (isModEnabled("supplier_order") && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? if (isModEnabled('facture') && !empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? if (isNaN(pbq)) { console.log("We use experimental option PRODUIT_CUSTOMER_PRICES_BY_QTY or PRODUIT_CUSTOMER_PRICES_BY_QTY but we could not get the id of pbq from product combo list, so load of price may be 0 if product has differet prices"); } jQuery("#mouvement option").removeAttr("selected").change(); @@ -248,7 +263,9 @@ $newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $showmode, '', 'project', 'list'); $newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list'); $object->actionmsg = dol_concatdesc($object->actionmsg, "\n".$langs->transnoentities("AttachedFiles").': '.$attachs); + $paramfortooltipimg .= ' title="' . ($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)) . '"'; // Attribut to put on img tag to store tooltip $paramfortooltipimg .= ' title="'.($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)).'"'; // Attribut to put on img tag to store tooltip + $paramfortooltiptd .= ' title="' . ($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)) . '"'; // Attribut to put on td tag to store tooltip $paramfortooltiptd .= ' title="'.($noencodehtmltext ? $htmltext : dol_escape_htmltag($htmltext, 1)).'"'; // Attribut to put on td tag to store tooltip $showfield = 1; // Par defaut $tagdatabase = true; // We don't know what it was before, so now we consider we are version choosed. @@ -274,6 +291,7 @@ // Add field of attribut // Ajout de l'utilisateur dans le groupe // Batch number managment + // By default, electronic transfert from bank to bank // Calculcate number of days consumed // Complete object by loading several other informations // Default and recommended: New method using ajax without submiting a page making a javascript history.go(-1) back @@ -288,6 +306,7 @@ // Fix Get multicurrency param for transmited // Fonctions de conversion non presente dans ce PHP // Get lines of sources alread delivered + // Get next free nuber for the ref of bon // If create form is coming from same page, it means that post was sent but an error occured // If not abandonned // If option "one bill per third" is set, and an invoice for this thirdparty was already created, we re-use it. @@ -348,6 +367,8 @@ GETPOST("mouvement", 'int'), console.log("Capture paymentIntent successfull "+paymentIntentId); continue; // The field was not submited to be saved + dol_syslog("The user login has a validity between [".$user->datestartvalidity." and ".$user->dateendvalidity."], curren date is ".dol_now()); + dol_syslog("functions_isallowed::check_user_api_key Authentication KO for '".$login."': The user login has a validity between [".$fuser->datestartvalidity." and ".$fuser->dateendvalidity."], curren date is ".dol_now()); dol_syslog('Bad password, connexion refused', LOG_DEBUG); dol_syslog('Bad value for code, connexion refused'); dol_syslog('Call fetch_barcode with barcode_type not defined and cant be guessed', LOG_WARNING); @@ -355,6 +376,7 @@ foreach ($legends as $val) { // Loop on each serie fwrite($handle, "\n-- WARNING: Show create table ".$table." return empy string when it should not.\n"); if ($ex) { // are we expecting an operator but have a number/variable/function/opening parethesis? + if ($forcedroundingmode == '1') { // Check if we need adjustement onto line for vat. TODO This works on the company currency but not on foreign currency if ($forcedroundingmode == '1') { // Check if we need adjustement onto line for vat. TODO This works on the company currency but not on multicurrency if (isModEnabled('facture') && !empty($conf->global->WORKFLOW_BILL_ON_RECEPTION)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? if (isModEnabled('facture') && !empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { // Quand l'option est on, il faut avoir le bouton en plus et non en remplacement du Close ? @@ -394,9 +416,12 @@ $jsListType .= (!empty($jsListType) ? ',' : '').'"'.$type.'":"'.$curent.'"'; $level = 0; // if $level = -1, we dont' use sublevel recursion, we show all lines $line->pa_ht = $line->pa_ht; // we choosed to have buy/cost price always positive, so no revert of sign here + $msgishtml = -1; // Unknow = autodetect by default $msgishtml = -1; // Unknow by default $paht_ret = $paht; + $paramfortooltipimg = ($extracss ? ' class="' . $extracss . '"' : '') . ($extrastyle ? ' style="' . $extrastyle . '"' : ''); // Attribut to put on td text tag $paramfortooltipimg = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag + $paramfortooltiptd = ($extracss ? ' class="' . $extracss . '"' : '') . ($extrastyle ? ' style="' . $extrastyle . '"' : ''); // Attribut to put on td text tag $paramfortooltiptd = ($extracss ? ' class="'.$extracss.'"' : '').($extrastyle ? ' style="'.$extrastyle.'"' : ''); // Attribut to put on td text tag $pdf->MultiCell($this->posxdiscount - $this->posxunit, 2, $outputlangs->transnoentities("Label Mouvement"), '', 'C'); $pdf->SetXY($this->getColumnContentXStart($colKey), $curY); // Set curent position @@ -444,8 +469,10 @@ // 2 - Suppression des utilisateurs du groupe Dolibarr qui ne sont plus dans le groupe LDAP // A redirect is added if API call successfull // Action according to choosed sending method + // Add entry into bank accoun // Add personnal information // Adding may convert the original string into a HTML string. Sowe have to first + // Adding a RSS feed into a sitemap should nto be required. The RSS contains pages that are already included into // Amount payed // Atom support many links per containging element. // Aucun model par defaut. @@ -473,6 +500,7 @@ // Gestion des utilisateurs associés au groupe // Groupes // If a bank account is prodived and we ask to use it as creditor, we use the bank address + // If googleoauth_login has been set (by google_oauthcallback after a successfull OAUTH2 request on openid scope // If not abandonned // If stock decrease is on invoice validation, the theorical stock continue to // If there is a nown BOM, we force the type of MO to the type of BOM @@ -487,6 +515,7 @@ // Note: We accept disabled account as parent account so we can build a hierarchy and use only childs // Note: We are here only if $conf->global->MAIN_AGENDA_ACTIONAUTO_action is on (tested at begining of this function). // Nouveau système du comon object renvoi des rowid et non un id linéaire de 1 à n + // On create mode, force separator group to not be collapsable // On nettoie le header pour qu'il ne se termine pas par un retour chariot. // On parcourt donc une liste d'objets en tant qu'objet unique // On selectionne les users qui ne sont pas deja dans le groupe @@ -512,6 +541,8 @@ // Succes // TODO : revoir la gestion des groupes (ou script de sync groupes) // TODO A virer quand sera gere par l'appelant + // TODO Add a link "Show more..." for all ohter informations. + // TODO Use a cahe on user // TODO We can't, we dont' have full path of file, only last_main_doc and ->element, so we must first rebuild full path $destfull // TODO We show localtax from $object, but this properties may not be correct. Only value $object->default_vat_code is guaranted. // TODO mettre dans une classe propre au pays @@ -526,6 +557,7 @@ // We must filter on assignement table // We need to keep the 10 lastest number of invoice doc_ref not the beginning part that is the unusefull almost same part // We use invoice date $data->doc_date not $date_ecriture which is the transfert date + // We use invoice date $line->doc_date not $date_ecriture which is the transfert date // add substition variable for ticket // add variables subtitutions ticket // count the orders to ship in theorical stock when some are already removed by invoice validation. @@ -549,7 +581,9 @@ //Origin project strat date //Stock mouvement //We use invoice date $data->doc_date not $date_ecriture which is the transfert date + //We use invoice date $line->doc_date not $date_ecriture which is the transfert date //XXX: Should be done just befor commit no ? + //but the note is saved, so just add a notification will be enought //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. //print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." port=".$conf->db->port." user=".$conf->db->user." name=".$conf->db->name; //si le sujet n'est pas celui qui a été effacé alors on concatene @@ -561,6 +595,7 @@ dol_syslog("Failed to read image using Imagick (Try to install package 'apt-get install php-imagick ghostscript' and check there is no policy to disable ".$ext." convertion in /etc/ImageMagick*/policy.xml): ".$e->getMessage(), LOG_WARNING); dol_syslog("Fichier invalide",LOG_WARNING); dol_syslog("RejetPrelevement::_send_email Userid invalide"); + dol_syslog('User not found or not valid, connexion refused'); dol_syslog('User not found, connexion refused'); dol_syslog(get_class($this) . "::validate action abandonned: already validated", LOG_WARNING); dol_syslog(get_class($this). '::setFrequencyAndUnit was called on objet with params frequency defined but unit not defined', LOG_ERR); @@ -585,6 +620,7 @@ dol_syslog(get_class($this)."::setNextDate was called on objet with property table_element not defined", LOG_ERR); dol_syslog(get_class($this)."::setProject was called on objet with property table_element not defined", LOG_ERR); dol_syslog(get_class($this)."::setShippingMethod was called on objet with property table_element not defined", LOG_ERR); + dol_syslog(get_class($this)."::setVATReverseCharge was called on objet with property table_element not defined", LOG_ERR); dol_syslog(get_class($this)."::setWarehouse was called on objet with property table_element not defined", LOG_ERR); dol_syslog(get_class($this)."::updateAttribute successfull", LOG_DEBUG); dol_syslog(get_class($this)."::update_note was called on objet with property table_element not defined", LOG_ERR); @@ -619,6 +655,8 @@ return -1; // Alternate souce not found return false; // Sould be 6 return false; // Sould be 6 but can be 123-456 + setEventMessage('The element '.$element.' is not supported for uploading file. dir_output is unknow.', 'errors'); + throw new Exception('The element '.$element.' is not supported for uploading file. dir_output is unknow.'); throw new RestException(403, 'Forbidden. This parameter cant be read with APIs'); while ($i < $nblot) { // Loop on each serie || empty($fk_price_level) // if fetch an unique level dont erase all already fetched @@ -680,6 +718,7 @@ $rouge = hexdec(substr($color, 0, 2)); //conversion du canal rouge $serie = array(); $showfield = 1; // By defaut + $sql .= " AND (p.last_check_backlink IS NULL OR p.last_check_backlink <= '".$this->db->idate($now - 24 * 3600)."')"; // Never more than 1 check every day to check that website contains a referal link. $sql .= " AND ff.fk_statut IS NULL"; // Renvoi vrai si pas facture de remplacement $sql .= " AND ff.type IS NULL"; // Renvoi vrai si pas facture de remplacement $sql .= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec succes @@ -705,6 +744,8 @@ $this->assertEquals('a : b " c \' d \' e é', $decodedstring, 'Function did not sanitize correclty'); $this->assertEquals('afile', $result); $this->assertEquals('eée', $decodedstring, 'Function did not sanitize correclty with test 1'); + $this->assertEquals('text text', $decodedstring, 'Function did not sanitize correclty with test 4a'); + $this->assertEquals('text text', $decodedstring, 'Function did not sanitize correclty with test 4b'); $this->assertTrue($result, 'move of directory with directory whitout rename needed in directory'); $this->assertTrue($result, 'move of directory with file whitout rename needed in directory'); $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/stocks/mouvements"; @@ -727,6 +768,7 @@ $this->rights[4][3] = 0; // La permission est-elle une permission par defaut $this->signature_line = dol_hash($keyforsignature, '5'); // Not really usefull $this->tva_intra = empty($conf->global->MAIN_INFO_TVAINTRA) ? '' : $conf->global->MAIN_INFO_TVAINTRA; // VAT number, not necessarly INTRA. + $this->tva_intra = getDolGlobalString('MAIN_INFO_TVAINTRA'); // VAT number, not necessarly INTRA. $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut 'filles' => array('name'=>'filles', 'type'=>'tns:FillesArray') 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 2=>'Paid', 3=>'Abandonned')), @@ -744,6 +786,7 @@ // 'member' to add a tab in fundation member view // - If not set, we accept ot have amount defined as parameter (for backward compatibility). // Action according to choosed sending method + // Add a where here keeping only the citeria on $tabletouse // Add code to open url using the popup. Add also hidden field to retreive the returned variables // Add infor from $object->xxx where xxx has been loaded by fetch_origin() of shipment // Add the count of record only for the main/first level object. Parents are necessarly unique for each record. @@ -757,8 +800,10 @@ // Chargement librairie pour acces fonction controle RIB // Check if field was submited to be edited // Check paramaters + // Check that the redirect_uri that wil be used is same than url of current domain // Classif "paid partialy" // Clean paramater $typeofdata + // Clear all fields out of interrest // Concatenation des differents codes. // Confirm cancelation // Confirm deleteion @@ -767,6 +812,7 @@ // Create with status validated immediatly // Creation de la classe d'import du model Import_XXX // Creation objet + // Date delivery planed // Delivery date planed // Dependancies // Don't log Luracast Restler Explorer recources calls @@ -796,6 +842,7 @@ // Keep the orginal // Limite acces si droits non corrects // Links beetween objects are stored in this table + // Load extrafields if not allready done // Load extrafiels if not allready does // Log the init of hook but only for hooks thare are declared to be managed // Loop on each line keword was found into file. @@ -843,6 +890,7 @@ // Syntaxe ko // Syntaxe ok // TODO Check the lineid $lineid is a line of ojbect + // TODO Remove hooks with type 'output' (exemple createFrom). All hooks must be converted into 'addreplace' hooks. // TODO Remove hooks with type 'output' (exemple getNomUrl). All hooks must be converted into 'addreplace' hooks. // Tableau des parametres complementaires du post // Test with restricthtml + MAIN_RESTRICTHTML_ONLY_VALID_HTML to test disabling of bad atrributes @@ -861,9 +909,11 @@ // We start scan from the not before so if two tabs were opend at differents seconds and we close one (so the js timer), // Wrapping pour les projets // accomodate both SMTP AND ESMTP capable servers + // add menu manualy // additionnal list with adherents of company // admin login no exectued. // attemp to create without mandatory fields : + // delete menu manuelly // for js desabled compatibility set $url as call to confirm action and $params['confirm']['url'] to confirmed action // groupe // if "frequency" is empty or = 0, the reccurence is disabled @@ -872,6 +922,7 @@ // l'adherent n'est pas public par defaut // need to be ignored from scrutinizer setTypeFromTypeString was created as deprecated to incite developper to use object oriented usage // on verifie si l'objet est en numerotation provisoire + // parcourir les objets // personnal stocks are not tagged into table llx_entrepot // reload page to retrieve customer informations // reload page to retrieve supplier informations @@ -884,6 +935,7 @@ //Add hook to filter on user (for exemple on usergroup define in custom modules) //If dispach process running we add the number of item to dispatch into the head //If invoice has been converted and the conversion has been used, we dont have remain to pay on invoice + //If no task avaiblable, redirec to to add confirm //In some case $object is not instanciate (for paiement on custom object) We need to deal with payment //Iterate over each expression splitted by $separator_chr //Label mouvement @@ -891,14 +943,18 @@ //We should use dol_now function not time however this is wrong date to transfert in accounting //check if tag type submited exists into Tag Map categorie class //decoding the respose + //fetch informations needs on this mode + //http_response_code(500); // If we use 500, message is not ouput with some command line tools //postion of Key //prevents agains infinite loop when we can't create root folder //print "L'EAN se compose de 8 caracteres, 7 chiffres plus une cle de controle.| '; - print ''; print ''; print ''; print ' | '; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index da443bbc05a..742be09cc82 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9155,7 +9155,7 @@ abstract class CommonObject $this->$field = (double) $obj->$field; } } else { - if (isset($obj->$field) && (!is_null($obj->$field) || (isset($info['notnull']) && $info['notnull'] == 1)) { + if (isset($obj->$field) && (!is_null($obj->$field) || (isset($info['notnull']) && $info['notnull'] == 1))) { $this->$field = (int) $obj->$field; } else { $this->$field = null; diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index decf76d7e8a..98051a0d2b6 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -510,7 +510,7 @@ class Loan extends CommonObject $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); } $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('Unpaid'); - $this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Enabled'); + $this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('Paid'); $this->labelStatusShort[self::STATUS_STARTED] = $langs->transnoentitiesnoconv("BillStatusStarted"); if ($status == 0 && $alreadypaid > 0) { $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted"); diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 52f93870619..6d66e835174 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -168,7 +168,7 @@ if (empty($reshook)) { $res = $object->add_object_linked('mo', $mo_parent->id); } - header("Location: ".dol_buildpath('/mrp/mo_card.php?id='.((int) $moline->fk_mo), 1)); + header("Location: ".dol_buildpath('/mrp/mo_card.php?id='.((int) $mo_parent->id), 1)); exit; } diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 0bf197e7a5e..43cd662677a 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -348,9 +348,13 @@ if ($source == 'proposal') { print ''."\n"; // Amount + $amount = '|
| '.$langs->trans("Amount"); $amount .= ' | '; $amount .= ''.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).''; + if ($object->multicurrency_code != $conf->currency) { + $amount .= ' ('.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).')'; + } $amount .= ' |