@@ -160,7 +160,7 @@ |
||
160 | 160 | $result = $this->fetchCommon($id); |
161 | 161 | } |
162 | 162 | |
163 | - $this->name = $this->nom; // For compatibility with field name |
|
163 | + $this->name = $this->nom; // For compatibility with field name |
|
164 | 164 | |
165 | 165 | if ($result) |
166 | 166 | { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $v->setPhoneNumber($contact->phone_mobile, "TYPE=CELL;VOICE"); |
67 | 67 | $v->setPhoneNumber($contact->fax, "TYPE=WORK;FAX"); |
68 | 68 | |
69 | -$country = $contact->country_code ? $contact->country : '' ; |
|
69 | +$country = $contact->country_code ? $contact->country : ''; |
|
70 | 70 | |
71 | 71 | $v->setAddress("", "", $contact->address, $contact->town, $contact->state, $contact->zip, $country, "TYPE=WORK;POSTAL"); |
72 | 72 | $v->setLabel("", "", $contact->address, $contact->town, $contact->state, $contact->zip, $country, "TYPE=WORK"); |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | if ($company->id) |
80 | 80 | { |
81 | 81 | $v->setURL($company->url, "TYPE=WORK"); |
82 | - if (! $contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); |
|
83 | - if (! $contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); |
|
84 | - if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); |
|
82 | + if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); |
|
83 | + if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); |
|
84 | + if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); |
|
85 | 85 | |
86 | 86 | // when company e-mail is empty, use only contact e-mail |
87 | 87 | if (empty(trim($company->email))) |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | $output = $v->getVCard(); |
127 | 127 | |
128 | -$filename = trim(urldecode($v->getFileName())); // "Nom prenom.vcf" |
|
128 | +$filename = trim(urldecode($v->getFileName())); // "Nom prenom.vcf" |
|
129 | 129 | $filenameurlencoded = dol_sanitizeFileName(urlencode($filename)); |
130 | 130 | //$filename = dol_sanitizeFileName($filename); |
131 | 131 |
@@ -148,7 +148,7 @@ |
||
148 | 148 | { |
149 | 149 | $thirdTypeArray['supplier'] = $langs->trans("supplier"); |
150 | 150 | if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices'); |
151 | - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']= $langs->transnoentitiesnoconv('SuppliersOrders'); |
|
151 | + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order'] = $langs->transnoentitiesnoconv('SuppliersOrders'); |
|
152 | 152 | |
153 | 153 | // There no contact type for supplier proposals |
154 | 154 | // if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); |
@@ -166,12 +166,12 @@ |
||
166 | 166 | |
167 | 167 | if ($qualified && $obj->module) |
168 | 168 | { |
169 | - if ($obj->module == 'invoice' && !$conf->facture->enabled) $qualified=0; |
|
170 | - if ($obj->module == 'order' && !$conf->commande->enabled) $qualified=0; |
|
171 | - if ($obj->module == 'propal' && !$conf->propal->enabled) $qualified=0; |
|
172 | - if ($obj->module == 'invoice_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ! $conf->supplier_invoice->enabled)) $qualified=0; |
|
173 | - if ($obj->module == 'order_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ! $conf->supplier_order->enabled)) $qualified=0; |
|
174 | - if ($obj->module == 'shipping' && !$conf->expedition->enabled) $qualified=0; |
|
169 | + if ($obj->module == 'invoice' && !$conf->facture->enabled) $qualified = 0; |
|
170 | + if ($obj->module == 'order' && !$conf->commande->enabled) $qualified = 0; |
|
171 | + if ($obj->module == 'propal' && !$conf->propal->enabled) $qualified = 0; |
|
172 | + if ($obj->module == 'invoice_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !$conf->supplier_invoice->enabled)) $qualified = 0; |
|
173 | + if ($obj->module == 'order_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !$conf->supplier_order->enabled)) $qualified = 0; |
|
174 | + if ($obj->module == 'shipping' && !$conf->expedition->enabled) $qualified = 0; |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | if ($qualified) |
@@ -105,7 +105,7 @@ |
||
105 | 105 | print '</td></tr>'; |
106 | 106 | } |
107 | 107 | |
108 | - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled)) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) |
|
108 | + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) |
|
109 | 109 | { |
110 | 110 | print '<tr><td class="titlefield">'; |
111 | 111 | print $langs->trans('SupplierCode').'</td><td colspan="3">'; |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) $rowspan++; |
565 | 565 | if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) $rowspan++; |
566 | 566 | if (!empty($conf->global->MAIN_MULTILANGS)) $rowspan++; |
567 | -if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled)) $rowspan++; |
|
567 | +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) $rowspan++; |
|
568 | 568 | |
569 | 569 | |
570 | 570 | print '<tr class="oddeven">'; |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | print '</tr>'; |
681 | 681 | } |
682 | 682 | |
683 | -if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled)) |
|
683 | +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) |
|
684 | 684 | { |
685 | 685 | print '<tr class="oddeven">'; |
686 | 686 | print '<td>'.$langs->trans("UseProductFournDesc").'</td>'; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $tab++; |
60 | 60 | |
61 | 61 | // Related items |
62 | - if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) |
|
62 | + if (!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) |
|
63 | 63 | { |
64 | 64 | $head[$tab][0] = DOL_URL_ROOT.'/contact/consumption.php?id='.$object->id; |
65 | 65 | $head[$tab][1] = $langs->trans("Referers"); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $regex = '([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]'; |
60 | 60 | $regex .= '|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2}|(.{1}))'; |
61 | 61 | |
62 | - $matches =array(); |
|
62 | + $matches = array(); |
|
63 | 63 | while (preg_match('/'.$regex.'/S', $string, $matches)) { |
64 | 64 | if (isset($matches[2])) { |
65 | 65 | return true; |
@@ -185,7 +185,7 @@ |
||
185 | 185 | |
186 | 186 | // Load the menu manager (only if not already done) |
187 | 187 | $file_menu = $conf->standard_menu; |
188 | -if (GETPOST('menu', 'aZ09')) $file_menu = GETPOST('menu', 'aZ09'); // example: menu=eldy_menu.php |
|
188 | +if (GETPOST('menu', 'aZ09')) $file_menu = GETPOST('menu', 'aZ09'); // example: menu=eldy_menu.php |
|
189 | 189 | if (!class_exists('MenuManager')) |
190 | 190 | { |
191 | 191 | $menufound = 0; |