From b6deda1111fd654086f6faf7d3dc6a0227e55b39 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 18 Feb 2019 12:28:18 +0100 Subject: [PATCH 01/25] FIX credit note used on list --- .../fourn/class/fournisseur.facture.class.php | 21 +++++++++++++++++++ htdocs/fourn/facture/list.php | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 086f154184d..4ad0b221c36 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2574,6 +2574,27 @@ class FactureFournisseur extends CommonInvoice return ($this->statut == self::STATUS_VALIDATED) && ($this->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)); } + + /** + * Is credit note used + * + * @return bool + */ + public function isCreditNoteUsed() + { + global $db; + + $isUsed = false; + + $sql = "SELECT fk_invoice_supplier FROM ".MAIN_DB_PREFIX."societe_remise_except WHERE fk_invoice_supplier_source=".$this->id; + $resql = $db->query($sql); + if(!empty($resql)){ + $obj = $db->fetch_object($resql); + if(!empty($obj->fk_invoice_supplier))$isUsed=true; + } + + return $isUsed; + } } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 98a6956a809..b53a07104c7 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -833,6 +833,7 @@ if ($resql) $facturestatic->date_echeance = $db->jdate($obj->datelimite); $facturestatic->statut = $obj->fk_statut; + $thirdparty->id=$obj->socid; $thirdparty->name=$obj->name; $thirdparty->client=$obj->client; @@ -850,6 +851,11 @@ if ($resql) $totalpay = $paiement + $totalcreditnotes + $totaldeposits; $remaintopay = $obj->total_ttc - $totalpay; + //If invoice has been converted and the conversion has been used, we dont have remain to pay on invoice + if($facturestatic->type == FactureFournisseur::TYPE_CREDIT_NOTE && $facturestatic->statut == FactureFournisseur::STATUS_CLOSED) { + if($facturestatic->isCreditNoteUsed())$remaintopay=0; + } + print ''; if (! empty($arrayfields['f.ref']['checked'])) { From 785092544115056183e718a831e3ac419c4b797e Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Fri, 22 Feb 2019 15:10:41 +0100 Subject: [PATCH 02/25] FIX amount opened on thirdparty card dont care of credit note not converted --- htdocs/societe/class/societe.class.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 412bf46b082..b894504bb10 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3727,7 +3727,7 @@ class Societe extends CommonObject $alreadypayed=price2num($paiement + $creditnotes + $deposits,'MT'); $remaintopay=price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits,'MT'); */ - if ($mode == 'supplier') $sql = "SELECT rowid, total_ht as total_ht, total_ttc, paye, fk_statut, close_code FROM ".MAIN_DB_PREFIX.$table." as f"; + if ($mode == 'supplier') $sql = "SELECT rowid, total_ht as total_ht, total_ttc, paye, type, fk_statut, close_code FROM ".MAIN_DB_PREFIX.$table." as f"; else $sql = "SELECT rowid, total as total_ht, total_ttc, paye, fk_statut, close_code FROM ".MAIN_DB_PREFIX.$table." as f"; $sql .= " WHERE fk_soc = ". $this->id; if ($mode == 'supplier') { @@ -3754,7 +3754,13 @@ class Societe extends CommonObject $tmpobject=new Facture($this->db); } while($obj=$this->db->fetch_object($resql)) { - $tmpobject->id=$obj->rowid; + $tmpobject->id=$obj->rowid; + + $paiement = $tmpobject->getSommePaiement(); + $creditnotes = $tmpobject->getSumCreditNotesUsed(); + $deposits = $tmpobject->getSumDepositsUsed(); + + if ($obj->fk_statut != 0 // Not a draft && ! ($obj->fk_statut == 3 && $obj->close_code == 'replaced') // Not a replaced invoice ) @@ -3768,11 +3774,14 @@ class Societe extends CommonObject && $obj->fk_statut != 2) // Not classified as paid //$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason { - $paiement = $tmpobject->getSommePaiement(); - $creditnotes = $tmpobject->getSumCreditNotesUsed(); - $deposits = $tmpobject->getSumDepositsUsed(); + $outstandingOpened+=$obj->total_ttc - $paiement - $creditnotes - $deposits; } + + if($mode == 'supplier' && $obj->type == FactureFournisseur::TYPE_CREDIT_NOTE && $obj->fk_statut == FactureFournisseur::STATUS_CLOSED && !$tmpobject->isCreditNoteUsed()) { //if credit note is converted but not used + + $outstandingOpened+=$obj->total_ttc-$paiement; + } } return array('opened'=>$outstandingOpened, 'total_ht'=>$outstandingTotal, 'total_ttc'=>$outstandingTotalIncTax); // 'opened' is 'incl taxes' } From dc7a2fbb30e34b04a5cc88af5ac6234c8be56911 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 25 Feb 2019 10:01:26 +0100 Subject: [PATCH 03/25] FIX placement function --- htdocs/societe/class/societe.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b894504bb10..7d54e7ad01e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3756,9 +3756,7 @@ class Societe extends CommonObject while($obj=$this->db->fetch_object($resql)) { $tmpobject->id=$obj->rowid; - $paiement = $tmpobject->getSommePaiement(); - $creditnotes = $tmpobject->getSumCreditNotesUsed(); - $deposits = $tmpobject->getSumDepositsUsed(); + if ($obj->fk_statut != 0 // Not a draft @@ -3774,12 +3772,15 @@ class Societe extends CommonObject && $obj->fk_statut != 2) // Not classified as paid //$sql .= " AND (fk_statut <> 3 OR close_code <> 'abandon')"; // Not abandonned for undefined reason { + $paiement = $tmpobject->getSommePaiement(); + $creditnotes = $tmpobject->getSumCreditNotesUsed(); + $deposits = $tmpobject->getSumDepositsUsed(); $outstandingOpened+=$obj->total_ttc - $paiement - $creditnotes - $deposits; } if($mode == 'supplier' && $obj->type == FactureFournisseur::TYPE_CREDIT_NOTE && $obj->fk_statut == FactureFournisseur::STATUS_CLOSED && !$tmpobject->isCreditNoteUsed()) { //if credit note is converted but not used - + if(empty($paiement)) $paiement = $tmpobject->getSommePaiement(); $outstandingOpened+=$obj->total_ttc-$paiement; } } From 6deba39c6a9d67826297d7422f8130bb95133b35 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Fri, 12 Apr 2019 10:16:13 +0200 Subject: [PATCH 04/25] FIX credit note can be split --- htdocs/core/class/commoninvoice.class.php | 23 ++++++++++++ htdocs/core/class/discount.class.php | 43 +++++++++++++++++++++++ htdocs/fourn/facture/list.php | 7 ++-- htdocs/societe/class/societe.class.php | 8 ++--- 4 files changed, 75 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 3aa8eb4e1ab..35ec6ad283e 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -195,6 +195,29 @@ abstract class CommonInvoice extends CommonObject } } + /** + * Return amount (with tax) of all converted amount for this credit note + * + * @param int $multicurrency Return multicurrency_amount instead of amount + * @return int <0 if KO, Sum of credit notes and deposits amount otherwise + */ + function getSumFromThisCreditNotesNotUsed($multicurrency=0) + { + require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; + + $discountstatic=new DiscountAbsolute($this->db); + $result=$discountstatic->getSumFromThisCreditNotesNotUsed($this, $multicurrency); + if ($result >= 0) + { + return $result; + } + else + { + $this->error=$discountstatic->error; + return -1; + } + } + /** * Renvoie tableau des ids de facture avoir issus de la facture * diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index cfe7ac24dea..2e99a83ec42 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -568,6 +568,49 @@ class DiscountAbsolute return -1; } } + /** + * Return amount (with tax) of all converted amount for this credit note + * + * @param CommonInvoice $invoice Object invoice + * @param int $multicurrency Return multicurrency_amount instead of amount + * @return int <0 if KO, Sum of credit notes and deposits amount otherwise + */ + function getSumFromThisCreditNotesNotUsed($invoice, $multicurrency=0) + { + dol_syslog(get_class($this)."::getSumCreditNotesUsed", LOG_DEBUG); + + if ($invoice->element == 'facture' || $invoice->element == 'invoice') + { + $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; + $sql.= ' WHERE rc.fk_facture IS NULL AND rc.fk_facture_source = '.$invoice->id; + } + else if ($invoice->element == 'invoice_supplier') + { + $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; + $sql.= ' WHERE rc.fk_invoice_supplier IS NULL AND rc.fk_invoice_supplier_source = '.$invoice->id; + } + else + { + $this->error=get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; + dol_print_error($this->error); + return -1; + } + + $resql=$this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + if ($multicurrency) return $obj->multicurrency_amount; + else return $obj->amount; + } + else + { + $this->error = $this->db->lasterror(); + return -1; + } + } /** * Return clickable ref of object (with picto or not) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 3e1827d6818..d8e18257d23 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -852,8 +852,11 @@ if ($resql) $remaintopay = $obj->total_ttc - $totalpay; //If invoice has been converted and the conversion has been used, we dont have remain to pay on invoice - if($facturestatic->type == FactureFournisseur::TYPE_CREDIT_NOTE && $facturestatic->statut == FactureFournisseur::STATUS_CLOSED) { - if($facturestatic->isCreditNoteUsed())$remaintopay=0; + if($facturestatic->type == FactureFournisseur::TYPE_CREDIT_NOTE) { + + if($facturestatic->isCreditNoteUsed()){ + $remaintopay=-$facturestatic->getSumFromThisCreditNotesNotUsed(); + } } print ''; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 7d54e7ad01e..87c4956e48e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3778,11 +3778,11 @@ class Societe extends CommonObject $outstandingOpened+=$obj->total_ttc - $paiement - $creditnotes - $deposits; } + + //if credit note is converted but not used + if($mode == 'supplier' && $obj->type == FactureFournisseur::TYPE_CREDIT_NOTE && $tmpobject->isCreditNoteUsed())$outstandingOpened-=$tmpobject->getSumFromThisCreditNotesNotUsed(); + - if($mode == 'supplier' && $obj->type == FactureFournisseur::TYPE_CREDIT_NOTE && $obj->fk_statut == FactureFournisseur::STATUS_CLOSED && !$tmpobject->isCreditNoteUsed()) { //if credit note is converted but not used - if(empty($paiement)) $paiement = $tmpobject->getSommePaiement(); - $outstandingOpened+=$obj->total_ttc-$paiement; - } } return array('opened'=>$outstandingOpened, 'total_ht'=>$outstandingTotal, 'total_ttc'=>$outstandingTotalIncTax); // 'opened' is 'incl taxes' } From 18eb2a83fe7c2d01bdb34cceec389a6f9541e1f6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Aug 2019 16:41:53 +0200 Subject: [PATCH 05/25] FIX #11671 CVE-2019-15062 --- htdocs/core/actions_linkedfiles.inc.php | 8 +++----- htdocs/core/class/html.formfile.class.php | 4 ++-- htdocs/user/card.php | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 297f7821599..16ba1669337 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -118,8 +118,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') { require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $link = new Link($db); - $link->id = $linkid; - $link->fetch(); + $link->fetch($linkid); $res = $link->delete($user); $langs->load('link'); @@ -153,8 +152,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save','alpha') && GETPOST('l require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php'; $langs->load('link'); $link = new Link($db); - $link->id = GETPOST('linkid', 'int'); - $f = $link->fetch(); + $f = $link->fetch(GETPOST('linkid', 'int')); if ($f) { $link->url = GETPOST('link', 'alpha'); @@ -162,7 +160,7 @@ elseif ($action == 'confirm_updateline' && GETPOST('save','alpha') && GETPOST('l { $link->url = 'http://' . $link->url; } - $link->label = GETPOST('label', 'alpha'); + $link->label = GETPOST('label', 'alphanohtml'); $res = $link->update($user); if (!$res) { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 2b02ada6b47..a198fba4f98 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1757,7 +1757,7 @@ class FormFile print $langs->trans('Link') . ': '; print ''; print ''; - print $langs->trans('Label') . ': '; + print $langs->trans('Label') . ': '; print ''; print '' . dol_print_date(dol_now(), "dayhour", "tzuser") . ''; print ''; @@ -1771,7 +1771,7 @@ class FormFile print ''; print img_picto('', 'object_globe').' '; print ''; - print $link->label; + print dol_escape_htmltag($link->label); print ''; print ''."\n"; print ''; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index adcf094e7a4..460e345131c 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -309,12 +309,12 @@ if (empty($reshook)) { { $error = 0; - if (!$_POST["lastname"]) { + if (! GETPOST("lastname", 'alpha')) { setEventMessages($langs->trans("NameNotDefined"), null, 'errors'); $action = "edit"; // Go back to create page $error ++; } - if (!$_POST["login"]) { + if (! GETPOST("login", 'alpha')) { setEventMessages($langs->trans("LoginNotDefined"), null, 'errors'); $action = "edit"; // Go back to create page $error ++; From 0be59646a848760b52d6761748187fa454617b21 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 22 Aug 2019 22:00:53 +0200 Subject: [PATCH 06/25] Update stripelive_oauthcallback.php --- htdocs/core/modules/oauth/stripelive_oauthcallback.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index cf2c2418092..bbea53f9049 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -65,7 +65,7 @@ $storage = new DoliStorage($db, $conf); // Setup the credentials for the requests $credentials = new Credentials( - $conf->global->OAUTH_STRIPE_TEST_ID, + $conf->global->OAUTH_STRIPE_LIVE_ID, $conf->global->STRIPE_LIVE_SECRET_KEY, $currentUri->getAbsoluteUri() ); From 06fdd5ddbc116a3f9894f7c25df7cfbe5265ab76 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Thu, 22 Aug 2019 22:50:41 +0200 Subject: [PATCH 07/25] Update stripelive_oauthcallback.php --- htdocs/core/modules/oauth/stripelive_oauthcallback.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index bbea53f9049..a32223105b9 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/oauth/stripe_oauthcallback.php + * \file htdocs/core/modules/oauth/stripelive_oauthcallback.php * \ingroup oauth * \brief Page to get oauth callback */ @@ -45,7 +45,7 @@ $backtourl = GETPOST('backtourl', 'alpha'); $uriFactory = new \OAuth\Common\Http\Uri\UriFactory(); //$currentUri = $uriFactory->createFromSuperGlobalArray($_SERVER); //$currentUri->setQuery(''); -$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripe_oauthcallback.php'); +$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php'); /** From 2d59f6bb3d1c17ceefa6be3e32f04e117e45f6da Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 23 Aug 2019 07:59:36 +0200 Subject: [PATCH 08/25] FIX avoid sql error if fk_project is empty during update --- .../compta/sociales/class/chargesociales.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index c3995a2202d..b08f1bda27f 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -291,17 +291,17 @@ class ChargeSociales extends CommonObject $sql.= ", date_ech='".$this->db->idate($this->date_ech)."'"; $sql.= ", periode='".$this->db->idate($this->periode)."'"; $sql.= ", amount='".price2num($this->amount,'MT')."'"; - $sql.= ", fk_projet='".$this->db->escape($this->fk_project)."'"; + $sql.= ", fk_projet=".($this->fk_project>0?$this->db->escape($this->fk_project):"NULL"); $sql.= ", fk_user_modif=".$user->id; $sql.= " WHERE rowid=".$this->id; dol_syslog(get_class($this)."::update", LOG_DEBUG); $resql=$this->db->query($sql); - + if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } - + if (! $error) { if (! $notrigger) @@ -312,7 +312,7 @@ class ChargeSociales extends CommonObject // End call triggers } } - + // Commit or rollback if ($error) { @@ -329,8 +329,8 @@ class ChargeSociales extends CommonObject $this->db->commit(); return 1; } - - + + } /** From 839ba76ae4da2ee11f544e9f6e2acb733ef691b5 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 23 Aug 2019 08:58:08 +0200 Subject: [PATCH 09/25] Update stripetest_oauthcallback.php --- htdocs/core/modules/oauth/stripetest_oauthcallback.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/oauth/stripetest_oauthcallback.php b/htdocs/core/modules/oauth/stripetest_oauthcallback.php index eb7463749ae..55b532f231c 100644 --- a/htdocs/core/modules/oauth/stripetest_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripetest_oauthcallback.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/oauth/stripe_oauthcallback.php + * \file htdocs/core/modules/oauth/stripetest_oauthcallback.php * \ingroup oauth * \brief Page to get oauth callback */ @@ -45,7 +45,7 @@ $backtourl = GETPOST('backtourl', 'alpha'); $uriFactory = new \OAuth\Common\Http\Uri\UriFactory(); //$currentUri = $uriFactory->createFromSuperGlobalArray($_SERVER); //$currentUri->setQuery(''); -$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripe_oauthcallback.php'); +$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php'); /** From b7e7ca46b577917416ccbf545e22024b1808df42 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Aug 2019 14:01:13 +0200 Subject: [PATCH 10/25] Fix responsive --- htdocs/fourn/facture/list.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 7d51f3783c1..fa05108b05c 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2019 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2013-2019 Philippe Grand * Copyright (C) 2013 Florian Henry @@ -588,14 +588,14 @@ if ($resql) if (! empty($arrayfields['f.ref']['checked'])) { print ''; - print ''; + print ''; print ''; } // Ref supplier if (! empty($arrayfields['f.ref_supplier']['checked'])) { print ''; - print ''; + print ''; print ''; } // Type @@ -622,7 +622,7 @@ if ($resql) if (! empty($arrayfields['f.label']['checked'])) { print ''; - print ''; + print ''; print ''; } // Date invoice @@ -647,17 +647,17 @@ if ($resql) // Project if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; } // Thirpdarty if (! empty($arrayfields['s.nom']['checked'])) { - print ''; + print ''; } // Town - if (! empty($arrayfields['s.town']['checked'])) print ''; + if (! empty($arrayfields['s.town']['checked'])) print ''; // Zip - if (! empty($arrayfields['s.zip']['checked'])) print ''; + if (! empty($arrayfields['s.zip']['checked'])) print ''; // State if (! empty($arrayfields['state.nom']['checked'])) { @@ -688,35 +688,35 @@ if ($resql) } if (! empty($arrayfields['f.total_ht']['checked'])) { - // Amount + // Amount without tax print ''; print ''; print ''; } if (! empty($arrayfields['f.total_vat']['checked'])) { - // Amount + // Amount vat print ''; print ''; print ''; } if (! empty($arrayfields['f.total_localtax1']['checked'])) { - // Amount + // Amount tax 1 print ''; print ''; print ''; } if (! empty($arrayfields['f.total_localtax2']['checked'])) { - // Amount + // Amount tax 2 print ''; print ''; print ''; } if (! empty($arrayfields['f.total_ttc']['checked'])) { - // Amount + // Amount inc tac print ''; print ''; print ''; @@ -776,7 +776,7 @@ if ($resql) if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER['PHP_SELF'], "p.ref", '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], 's.nom', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); + if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder); if (! empty($arrayfields['country.code_iso']['checked'])) print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center '); @@ -944,7 +944,7 @@ if ($resql) // Zip if (! empty($arrayfields['s.zip']['checked'])) { - print ''; + print ''; print $obj->zip; print ''; if (! $i) $totalarray['nbfield']++; From 064ab389ed0030e19514fcea944f6d64af212e03 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 24 Aug 2019 12:44:23 +0200 Subject: [PATCH 11/25] FIX wrong parameters (same error in branch 9, 10, develop) --- htdocs/compta/paiement.php | 2 +- htdocs/projet/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 4888b758cc1..aa344c3df2e 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -530,7 +530,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $sql = 'SELECT f.rowid as facid, f.facnumber, f.total_ttc, f.multicurrency_code, f.multicurrency_total_ttc, f.type,'; $sql.= ' f.datef as df, f.fk_soc as socid'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as f'; - $sql.= ' WHERE f.entity IN ('.getEntity('facture', $conf->entity).')'; + $sql.= ' WHERE f.entity IN ('.getEntity('facture').')'; $sql.= ' AND (f.fk_soc = '.$facture->socid; // Can pay invoices of all child of parent company if(!empty($conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS) && !empty($facture->thirdparty->parent)) { diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 906cb3783f1..4c4ae4c71cf 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -258,7 +258,7 @@ $sql = "SELECT COUNT(p.rowid) as nb, SUM(p.opp_amount)"; $sql.= ", s.nom as name, s.rowid as socid"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; -$sql.= " WHERE p.entity IN (".getEntity('project', $conf->entity).")"; +$sql.= " WHERE p.entity IN (".getEntity('project').")"; $sql.= " AND p.fk_statut = 1"; if ($mine || empty($user->rights->projet->all->lire)) $sql.= " AND p.rowid IN (".$projectsListId.")"; // If we have this test true, it also means projectset is not 2 if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")"; From 73a6b45e23ac22c070ab69c4d37e5ade23bf6c51 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 13:26:01 +0200 Subject: [PATCH 12/25] Fix load langs in takepos --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index ed3e5def318..68c7cf0ef55 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -29,7 +29,7 @@ require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; -$langs->loadLangs(array("bills", "cashdesk")); +$langs->loadLangs(array("companies","commercial","bills", "cashdesk")); $id = GETPOST('id','int'); $action = GETPOST('action','alpha'); From bb763ecb59bfafde02b8095ef4a8721dba358b86 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 14:02:25 +0200 Subject: [PATCH 13/25] Fix lang in takepos --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index e09c31664cd..4737ecbde27 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -367,7 +367,7 @@ if ($action=="valid" || $action=="history") } else { - if ($invoice->paye) $sectionwithinvoicelink.=''.$langs->trans("Payed").''; + if ($invoice->paye) $sectionwithinvoicelink.=''.$langs->trans("Paid").''; else $sectionwithinvoicelink.=$langs->trans('BillShortStatusValidated'); } $sectionwithinvoicelink.=''; From c4b18890d952a2e1611d08b419ebf295c1db6c4c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:12:56 +0200 Subject: [PATCH 14/25] Update invoice.php --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 4737ecbde27..1e11161e8a1 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -511,7 +511,7 @@ print '
'.$sectionwithinvoicelink; print ''; print '' . $langs->trans('ReductionShort') . ''; print '' . $langs->trans('Qty') . ''; -print '' . $langs->trans('TotalHTShort') . ''; +print '' . $langs->trans('Total') . ''; print "\n"; if ($placeid > 0) From 2be125e647daa8680559a7900cacac959b8a89c1 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:47:17 +0200 Subject: [PATCH 15/25] Fix display context for takepos in invoice list fix for thirdparty name and create button --- htdocs/compta/facture/list.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 284b747465d..f0c10598f82 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -605,7 +605,7 @@ if ($resql) $massactionbutton=$form->selectMassAction('', $arrayofmassactions); $newcardbutton=''; - if($user->rights->facture->creer) + if($user->rights->facture->creer && $contextpage != 'poslist') { $newcardbutton.= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/facture/card.php?action=create'); } @@ -1068,7 +1068,14 @@ if ($resql) if (! empty($arrayfields['s.nom']['checked'])) { print ''; - print $thirdpartystatic->getNomUrl(1, 'customer'); + if ($contextpage == 'poslist') + { + print $thirdpartystatic->name; + } + else + { + print $thirdpartystatic->getNomUrl(1, 'customer'); + } print ''; if (! $i) $totalarray['nbfield']++; } From 7112fcee9a6031a93294f235f132f55a3ac65906 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:54:14 +0200 Subject: [PATCH 16/25] Update list.php --- htdocs/compta/facture/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f0c10598f82..653f1182d78 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -687,7 +687,7 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); + if ($massactionbutton && $contextpage != 'poslist') $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); print '
'; print ''."\n"; @@ -1237,7 +1237,7 @@ if ($resql) // Action column print ''; } +if (! empty($arrayfields['p.jabberid']['checked'])) +{ + print ''; +} if (! empty($arrayfields['p.twitter']['checked'])) { print ''; print ''; print ''; -print ''; +print ''; print "\n"; if ($placeid > 0)
'; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected=0; if (in_array($obj->id, $arrayofselected)) $selected=1; From 7b5c9818f7b25b623a68b472f7f79a3083d1898d Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 15:58:33 +0200 Subject: [PATCH 17/25] Fix context display with takepos societe/list.php --- htdocs/societe/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index daff9aec557..8f352a21b28 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -670,7 +670,7 @@ if ($moreforfilter) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields -if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); +if ($massactionbutton && $contextpage != 'poslist') $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); if (empty($arrayfields['customerorsupplier']['checked'])) print ''; @@ -1287,7 +1287,7 @@ while ($i < min($num, $limit)) // Action column print ''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected=0; if (in_array($obj->rowid, $arrayofselected)) $selected=1; From dbcead47e1eaf8c972b0850704eafe7409341cd1 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 24 Aug 2019 16:05:21 +0200 Subject: [PATCH 18/25] Update list.php --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index daff9aec557..ebf03cb2d3d 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -199,7 +199,7 @@ $arrayfields=array( 's.idprof5'=>array('label'=>"ProfId5Short", 'checked'=>$checkedprofid5), 's.idprof6'=>array('label'=>"ProfId6Short", 'checked'=>$checkedprofid6), 's.tva_intra'=>array('label'=>"VATIntraShort", 'checked'=>0), - 'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1), + 'customerorsupplier'=>array('label'=>'Type', 'checked'=>1), 's.fk_prospectlevel'=>array('label'=>"ProspectLevelShort", 'checked'=>$checkprospectlevel), 's.fk_stcomm'=>array('label'=>"StatusProsp", 'checked'=>$checkstcomm), 's2.nom'=>array('label'=>'ParentCompany', 'checked'=>0), From 60c3cefc53040eaaf3f311a73b4bc5db03cf7aaa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Aug 2019 16:41:59 +0200 Subject: [PATCH 19/25] FIX Api of documents work with value 'thirdparty' --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 1012b825254..c6a5cb14426 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2445,7 +2445,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for third parties - elseif (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output)) + elseif (($modulepart == 'company' || $modulepart == 'societe' || $modulepart == 'thirdparty') && !empty($conf->societe->dir_output)) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire} || preg_match('/^specimen/i', $original_file)) From b00020c4ea2bc948feff82b8e491637337798779 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 26 Aug 2019 12:10:19 +0200 Subject: [PATCH 20/25] FIX #11746 Unable to modify amount of insurance of a loan --- htdocs/loan/card.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index e826e86ea57..c1a4d022fda 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -179,11 +179,12 @@ if (empty($reshook)) } else { - $object->datestart = $datestart; - $object->dateend = $dateend; - $object->capital = $capital; - $object->nbterm = GETPOST("nbterm", 'int'); - $object->rate = price2num(GETPOST("rate", 'alpha')); + $object->datestart = $datestart; + $object->dateend = $dateend; + $object->capital = $capital; + $object->nbterm = GETPOST("nbterm", 'int'); + $object->rate = price2num(GETPOST("rate", 'alpha')); + $object->insurance_amount = price2num(GETPOST('insurance_amount', 'int')); $accountancy_account_capital = GETPOST('accountancy_account_capital'); $accountancy_account_insurance = GETPOST('accountancy_account_insurance'); From 76691925a4796474dc8d60b36b143c01e9eb8f6c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 26 Aug 2019 15:35:20 +0200 Subject: [PATCH 21/25] FIX Missing div for buttons in tax, loan, various payment modules --- htdocs/compta/bank/various_payment/card.php | 6 +++--- htdocs/compta/salaries/card.php | 6 +++--- htdocs/compta/sociales/card.php | 12 ++++++------ htdocs/compta/tva/card.php | 6 +++--- htdocs/loan/card.php | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index 67f1e2909fc..aac8f603054 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -544,16 +544,16 @@ if ($id) { if (! empty($user->rights->banque->modifier)) { - print ''.$langs->trans("Delete").''; + print ''; } else { - print ''.$langs->trans("Delete").''; + print ''; } } else { - print ''.$langs->trans("Delete").''; + print ''; } print ""; diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index c19b18bc0f0..392b90b7bb6 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -473,16 +473,16 @@ if ($id) { if (! empty($user->rights->salaries->delete)) { - print ''.$langs->trans("Delete").''; + print ''; } else { - print ''.$langs->trans("Delete").''; + print ''; } } else { - print ''.$langs->trans("Delete").''; + print ''; } print ""; } diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 0318efb7e1a..9e68e6e79a3 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -710,37 +710,37 @@ if ($id > 0) // Reopen if ($object->paye && $user->rights->tax->charges->creer) { - print "id&action=reopen\">".$langs->trans("ReOpen").""; + print ""; } // Edit if ($object->paye == 0 && $user->rights->tax->charges->creer) { - print "id&action=edit\">".$langs->trans("Modify").""; + print ""; } // Emit payment if ($object->paye == 0 && ((price2num($object->amount) < 0 && price2num($resteapayer, 'MT') < 0) || (price2num($object->amount) > 0 && price2num($resteapayer, 'MT') > 0)) && $user->rights->tax->charges->creer) { - print "id&action=create\">".$langs->trans("DoPayment").""; + print ""; } // Classify 'paid' if ($object->paye == 0 && round($resteapayer) <=0 && $user->rights->tax->charges->creer) { - print "id&action=paid\">".$langs->trans("ClassifyPaid").""; + print ""; } // Clone if ($user->rights->tax->charges->creer) { - print "id&action=clone\">".$langs->trans("ToClone").""; + print ""; } // Delete if ($user->rights->tax->charges->supprimer) { - print "id&action=delete\">".$langs->trans("Delete").""; + print ""; } print ""; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index be738b374cf..759ed75df5e 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -385,16 +385,16 @@ if ($id) { if (! empty($user->rights->tax->charges->supprimer)) { - print ''.$langs->trans("Delete").''; + print ''; } else { - print ''.$langs->trans("Delete").''; + print ''; } } else { - print ''.$langs->trans("Delete").''; + print ''; } print ""; } diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index e826e86ea57..f4c624e0e96 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -793,25 +793,25 @@ if ($id > 0) { // print ''.$langs->trans('CreateCalcSchedule').''; - print ''.$langs->trans("Modify").''; + print ''; } // Emit payment if ($object->paid == 0 && ((price2num($object->capital) > 0 && round($staytopay) < 0) || (price2num($object->capital) > 0 && round($staytopay) > 0)) && $user->rights->loan->write) { - print ''.$langs->trans("DoPayment").''; + print ''; } // Classify 'paid' if ($object->paid == 0 && round($staytopay) <=0 && $user->rights->loan->write) { - print ''.$langs->trans("ClassifyPaid").''; + print ''; } // Delete if ($object->paid == 0 && $user->rights->loan->delete) { - print ''.$langs->trans("Delete").''; + print ''; } print ""; From 7ebd79a45f796068c3e37e8ab0d1b9b33ea21964 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Aug 2019 16:02:24 +0200 Subject: [PATCH 22/25] Update list.php --- htdocs/societe/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index ebf03cb2d3d..a7cdc68f34a 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -199,7 +199,7 @@ $arrayfields=array( 's.idprof5'=>array('label'=>"ProfId5Short", 'checked'=>$checkedprofid5), 's.idprof6'=>array('label'=>"ProfId6Short", 'checked'=>$checkedprofid6), 's.tva_intra'=>array('label'=>"VATIntraShort", 'checked'=>0), - 'customerorsupplier'=>array('label'=>'Type', 'checked'=>1), + 'customerorsupplier'=>array('label'=>'NatureOfThirdParty', 'checked'=>1), 's.fk_prospectlevel'=>array('label'=>"ProspectLevelShort", 'checked'=>$checkprospectlevel), 's.fk_stcomm'=>array('label'=>"StatusProsp", 'checked'=>$checkstcomm), 's2.nom'=>array('label'=>'ParentCompany', 'checked'=>0), From 0c8640bfd9c52e2fc1a22641f9327504a1cf3d12 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Aug 2019 16:09:20 +0200 Subject: [PATCH 23/25] FIX #11752 --- htdocs/core/tpl/contacts.tpl.php | 2 +- htdocs/langs/en_US/companies.lang | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 3830e2bc31a..14534b3472e 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -69,7 +69,7 @@ $userstatic=new User($db); if ($permission) { ?>
-
trans("Nature"); ?>
+
trans("NatureOfContact"); ?>
trans("ThirdParty"); ?>
trans("Users").'/'.$langs->trans("Contacts"); ?>
trans("ContactType"); ?>
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 616b565496a..dccd53c597a 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -54,6 +54,7 @@ Firstname=First name PostOrFunction=Job position UserTitle=Title NatureOfThirdParty=Nature of Third party +NatureOfContact=Nature of Contact Address=Address State=State/Province StateShort=State From d08ed9fbcf2f2c50b3d59269bf6745ded98f6cfd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Aug 2019 16:19:39 +0200 Subject: [PATCH 24/25] FIX column jabberid missing --- htdocs/contact/list.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index fa26c5ed30b..b0db8b0affb 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -165,8 +165,8 @@ $arrayfields=array( 'p.fax'=>array('label'=>"Fax", 'checked'=>0), 'p.email'=>array('label'=>"EMail", 'checked'=>1), 'p.no_email'=>array('label'=>"No_Email", 'checked'=>0, 'enabled'=>(! empty($conf->mailing->enabled))), - 'p.jabberid'=>array('label'=>"Jabber", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), 'p.skype'=>array('label'=>"Skype", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), + 'p.jabberid'=>array('label'=>"Jabber", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), 'p.twitter'=>array('label'=>"Twitter", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), 'p.facebook'=>array('label'=>"Facebook", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), 'p.linkedin'=>array('label'=>"LinkedIn", 'checked'=>1, 'enabled'=>(! empty($conf->socialnetworks->enabled))), @@ -427,7 +427,7 @@ if ($search_societe != '') $param.='&search_societe='.urlencode($search_soci if ($search_zip != '') $param.='&search_zip='.urlencode($search_zip); if ($search_town != '') $param.='&search_town='.urlencode($search_town); if ($search_country != '') $param.= "&search_country=".urlencode($search_country); -if ($search_job != '') $param.='&search_job='.urlencode($search_job); +if ($search_poste != '') $param.='&search_poste='.urlencode($search_poste); if ($search_phone_pro != '') $param.='&search_phone_pro='.urlencode($search_phone_pro); if ($search_phone_perso != '') $param.='&search_phone_perso='.urlencode($search_phone_perso); if ($search_phone_mobile != '') $param.='&search_phone_mobile='.urlencode($search_phone_mobile); @@ -629,6 +629,12 @@ if (! empty($arrayfields['p.skype']['checked'])) print ''; print '
'; + print ''; + print ''; @@ -720,6 +726,7 @@ if (! empty($arrayfields['p.fax']['checked'])) print_liste_field if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.no_email']['checked'])) print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($arrayfields['p.skype']['label'], $_SERVER["PHP_SELF"], "p.skype", $begin, $param, '', $sortfield, $sortorder); +if (! empty($arrayfields['p.jabberid']['checked'])) print_liste_field_titre($arrayfields['p.jabberid']['label'], $_SERVER["PHP_SELF"], "p.jabberid", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.twitter']['checked'])) print_liste_field_titre($arrayfields['p.twitter']['label'], $_SERVER["PHP_SELF"], "p.twitter", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.facebook']['checked'])) print_liste_field_titre($arrayfields['p.facebook']['label'], $_SERVER["PHP_SELF"], "p.facebook", $begin, $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.linkedin']['checked'])) print_liste_field_titre($arrayfields['p.linkedin']['label'], $_SERVER["PHP_SELF"], "p.linkedin", $begin, $param, '', $sortfield, $sortorder); From 6771a2e1f9e5ec38b65088cbb95ff78ad1dde99f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Aug 2019 16:27:00 +0200 Subject: [PATCH 25/25] Update invoice.php --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 1e11161e8a1..a6ff3be5b06 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -511,7 +511,7 @@ print '
'.$sectionwithinvoicelink; print '
' . $langs->trans('ReductionShort') . '' . $langs->trans('Qty') . '' . $langs->trans('Total') . '' . $langs->trans('TotalTTCShort') . '