@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function __toString() |
| 71 | 71 | { |
| 72 | - require_once DOL_DOCUMENT_ROOT . '/variants/class/ProductAttributeValue.class.php'; |
|
| 73 | - require_once DOL_DOCUMENT_ROOT . '/variants/class/ProductAttribute.class.php'; |
|
| 72 | + require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttributeValue.class.php'; |
|
| 73 | + require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php'; |
|
| 74 | 74 | |
| 75 | 75 | $prodattr = new ProductAttribute($this->db); |
| 76 | 76 | $prodattrval = new ProductAttributeValue($this->db); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $prodattr->fetch($this->fk_prod_attr); |
| 79 | 79 | $prodattrval->fetch($this->fk_prod_attr_val); |
| 80 | 80 | |
| 81 | - return $prodattr->label . ': ' . $prodattrval->value; |
|
| 81 | + return $prodattr->label.': '.$prodattrval->value; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -89,14 +89,14 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | public function create($user) |
| 91 | 91 | { |
| 92 | - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_attribute_combination2val |
|
| 92 | + $sql = "INSERT INTO ".MAIN_DB_PREFIX."product_attribute_combination2val |
|
| 93 | 93 | (fk_prod_combination, fk_prod_attr, fk_prod_attr_val) |
| 94 | - VALUES(" . (int) $this->fk_prod_combination . ", " . (int) $this->fk_prod_attr . ", " . (int) $this->fk_prod_attr_val . ")"; |
|
| 94 | + VALUES(" . (int) $this->fk_prod_combination.", ".(int) $this->fk_prod_attr.", ".(int) $this->fk_prod_attr_val.")"; |
|
| 95 | 95 | |
| 96 | 96 | $query = $this->db->query($sql); |
| 97 | 97 | |
| 98 | 98 | if ($query) { |
| 99 | - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . 'product_attribute_combination2val'); |
|
| 99 | + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'product_attribute_combination2val'); |
|
| 100 | 100 | |
| 101 | 101 | return 1; |
| 102 | 102 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | c2v.fk_prod_attr_val, |
| 118 | 118 | c2v.fk_prod_attr, |
| 119 | 119 | c2v.fk_prod_combination |
| 120 | - FROM " . MAIN_DB_PREFIX . "product_attribute c LEFT JOIN " . MAIN_DB_PREFIX . "product_attribute_combination2val c2v ON c.rowid = c2v.fk_prod_attr |
|
| 120 | + FROM " . MAIN_DB_PREFIX."product_attribute c LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination2val c2v ON c.rowid = c2v.fk_prod_attr |
|
| 121 | 121 | WHERE c2v.fk_prod_combination = " . (int) $fk_combination; |
| 122 | 122 | |
| 123 | 123 | $sql .= $this->db->order('c.position', 'asc'); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | public function deleteByFkCombination($fk_combination) |
| 153 | 153 | { |
| 154 | - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "product_attribute_combination2val WHERE fk_prod_combination = " . (int) $fk_combination; |
|
| 154 | + $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_attribute_combination2val WHERE fk_prod_combination = ".(int) $fk_combination; |
|
| 155 | 155 | |
| 156 | 156 | if ($this->db->query($sql)) { |
| 157 | 157 | return 1; |
@@ -28,9 +28,9 @@ |
||
| 28 | 28 | |
| 29 | 29 | // Load Dolibarr environment |
| 30 | 30 | require '../main.inc.php'; |
| 31 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
| 32 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; |
|
| 33 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; |
|
| 31 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
| 32 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php'; |
|
| 33 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php'; |
|
| 34 | 34 | |
| 35 | 35 | // Load translation files required by the page |
| 36 | 36 | $langs->loadLangs(array('hrm', 'companies')); |
@@ -245,12 +245,12 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | print '<table class="noborder centpercent">'; |
| 247 | 247 | print '<tr class="liste_titre">'; |
| 248 | - print '<td width="30%">' . $langs->trans("Year") . '</td>'; |
|
| 249 | - print '<td class="right">' . $langs->trans("VATToPay") . '</td>'; |
|
| 250 | - print '<td class="right">' . $langs->trans("VATToCollect") . '</td>'; |
|
| 251 | - print '<td class="right">' . $langs->trans("Balance") . '</td>'; |
|
| 252 | - print '<td> </td>' . "\n"; |
|
| 253 | - print '</tr>' . "\n"; |
|
| 248 | + print '<td width="30%">'.$langs->trans("Year").'</td>'; |
|
| 249 | + print '<td class="right">'.$langs->trans("VATToPay").'</td>'; |
|
| 250 | + print '<td class="right">'.$langs->trans("VATToCollect").'</td>'; |
|
| 251 | + print '<td class="right">'.$langs->trans("Balance").'</td>'; |
|
| 252 | + print '<td> </td>'."\n"; |
|
| 253 | + print '</tr>'."\n"; |
|
| 254 | 254 | |
| 255 | 255 | $tmp = dol_getdate($date_start); |
| 256 | 256 | $y = $tmp['year']; |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | |
| 396 | 396 | print '<tr class="oddeven">'; |
| 397 | - print '<td class="nowrap"><a href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?leftmenu=tax_vat&month=' . $m . '&year=' . $y . '">' . dol_print_date(dol_mktime(0, 0, 0, $m, 1, $y), "%b %Y") . '</a></td>'; |
|
| 397 | + print '<td class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?leftmenu=tax_vat&month='.$m.'&year='.$y.'">'.dol_print_date(dol_mktime(0, 0, 0, $m, 1, $y), "%b %Y").'</a></td>'; |
|
| 398 | 398 | |
| 399 | 399 | $x_coll_sum = 0; |
| 400 | 400 | foreach (array_keys($x_coll) as $rate) { |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | $x_coll_sum += $temp_vat; |
| 435 | 435 | } |
| 436 | 436 | } |
| 437 | - print '<td class="nowrap right"><span class="amount">' . price(price2num($x_coll_sum, 'MT')) . '</span></td>'; |
|
| 437 | + print '<td class="nowrap right"><span class="amount">'.price(price2num($x_coll_sum, 'MT')).'</span></td>'; |
|
| 438 | 438 | |
| 439 | 439 | $x_paye_sum = 0; |
| 440 | 440 | foreach (array_keys($x_paye) as $rate) { |
@@ -474,7 +474,7 @@ discard block |
||
| 474 | 474 | $x_paye_sum += $temp_vat; |
| 475 | 475 | } |
| 476 | 476 | } |
| 477 | - print '<td class="nowrap right"><span class="amount">' . price(price2num($x_paye_sum, 'MT')) . '</span></td>'; |
|
| 477 | + print '<td class="nowrap right"><span class="amount">'.price(price2num($x_paye_sum, 'MT')).'</span></td>'; |
|
| 478 | 478 | |
| 479 | 479 | $subtotalcoll = $subtotalcoll + $x_coll_sum; |
| 480 | 480 | $subtotalpaid = $subtotalpaid + $x_paye_sum; |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | $total = $total + $diff; |
| 484 | 484 | $subtotal = price2num($subtotal + $diff, 'MT'); |
| 485 | 485 | |
| 486 | - print '<td class="nowrap right"><span class="amount">' . price(price2num($diff, 'MT')) . '</span></td>' . "\n"; |
|
| 486 | + print '<td class="nowrap right"><span class="amount">'.price(price2num($diff, 'MT')).'</span></td>'."\n"; |
|
| 487 | 487 | print "<td> </td>\n"; |
| 488 | 488 | print "</tr>\n"; |
| 489 | 489 | |
@@ -492,10 +492,10 @@ discard block |
||
| 492 | 492 | $m++; |
| 493 | 493 | if ($i > 2) { |
| 494 | 494 | print '<tr class="liste_total">'; |
| 495 | - print '<td class="right"><a href="quadri_detail.php?leftmenu=tax_vat&q=' . round($m / 3) . '&year=' . $y . '">' . $langs->trans("SubTotal") . '</a>:</td>'; |
|
| 496 | - print '<td class="nowrap right">' . price(price2num($subtotalcoll, 'MT')) . '</td>'; |
|
| 497 | - print '<td class="nowrap right">' . price(price2num($subtotalpaid, 'MT')) . '</td>'; |
|
| 498 | - print '<td class="nowrap right">' . price(price2num($subtotal, 'MT')) . '</td>'; |
|
| 495 | + print '<td class="right"><a href="quadri_detail.php?leftmenu=tax_vat&q='.round($m / 3).'&year='.$y.'">'.$langs->trans("SubTotal").'</a>:</td>'; |
|
| 496 | + print '<td class="nowrap right">'.price(price2num($subtotalcoll, 'MT')).'</td>'; |
|
| 497 | + print '<td class="nowrap right">'.price(price2num($subtotalpaid, 'MT')).'</td>'; |
|
| 498 | + print '<td class="nowrap right">'.price(price2num($subtotal, 'MT')).'</td>'; |
|
| 499 | 499 | print '<td> </td></tr>'; |
| 500 | 500 | $i = 0; |
| 501 | 501 | $subtotalcoll = 0; |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | $subtotal = 0; |
| 504 | 504 | } |
| 505 | 505 | } |
| 506 | - print '<tr class="liste_total"><td class="right" colspan="3">' . $langs->trans("TotalToPay") . ':</td><td class="nowrap right">' . price(price2num($total, 'MT')) . '</td>'; |
|
| 506 | + print '<tr class="liste_total"><td class="right" colspan="3">'.$langs->trans("TotalToPay").':</td><td class="nowrap right">'.price(price2num($total, 'MT')).'</td>'; |
|
| 507 | 507 | print "<td> </td>\n"; |
| 508 | 508 | print '</tr>'; |
| 509 | 509 | |
@@ -521,18 +521,18 @@ discard block |
||
| 521 | 521 | $sql = ''; |
| 522 | 522 | |
| 523 | 523 | $sql .= "SELECT SUM(amount) as mm, date_format(tva.datev,'%Y-%m') as dm, 'claimed' as mode"; |
| 524 | - $sql .= " FROM " . MAIN_DB_PREFIX . "tva as tva"; |
|
| 525 | - $sql .= " WHERE tva.entity = " . $conf->entity; |
|
| 526 | - $sql .= " AND (tva.datev >= '" . $db->idate($date_start) . "' AND tva.datev <= '" . $db->idate($date_end) . "')"; |
|
| 524 | + $sql .= " FROM ".MAIN_DB_PREFIX."tva as tva"; |
|
| 525 | + $sql .= " WHERE tva.entity = ".$conf->entity; |
|
| 526 | + $sql .= " AND (tva.datev >= '".$db->idate($date_start)."' AND tva.datev <= '".$db->idate($date_end)."')"; |
|
| 527 | 527 | $sql .= " GROUP BY dm"; |
| 528 | 528 | |
| 529 | 529 | $sql .= " UNION "; |
| 530 | 530 | |
| 531 | 531 | $sql .= "SELECT SUM(ptva.amount) as mm, date_format(tva.datev,'%Y-%m') as dm, 'paid' as mode"; |
| 532 | - $sql .= " FROM " . MAIN_DB_PREFIX . "tva as tva"; |
|
| 533 | - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "payment_vat as ptva ON (tva.rowid = ptva.fk_tva)"; |
|
| 534 | - $sql .= " WHERE tva.entity = " . $conf->entity; |
|
| 535 | - $sql .= " AND (tva.datev >= '" . $db->idate($date_start) . "' AND tva.datev <= '" . $db->idate($date_end) . "')"; |
|
| 532 | + $sql .= " FROM ".MAIN_DB_PREFIX."tva as tva"; |
|
| 533 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_vat as ptva ON (tva.rowid = ptva.fk_tva)"; |
|
| 534 | + $sql .= " WHERE tva.entity = ".$conf->entity; |
|
| 535 | + $sql .= " AND (tva.datev >= '".$db->idate($date_start)."' AND tva.datev <= '".$db->idate($date_end)."')"; |
|
| 536 | 536 | $sql .= " GROUP BY dm"; |
| 537 | 537 | |
| 538 | 538 | $sql .= " ORDER BY dm ASC, mode ASC"; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | public function formFilter() |
| 122 | 122 | { |
| 123 | - global $conf,$langs; |
|
| 123 | + global $conf, $langs; |
|
| 124 | 124 | |
| 125 | 125 | // Load translation files required by the page |
| 126 | 126 | $langs->loadLangs(array("commercial", "companies", "suppliers", "categories")); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $sql = "SELECT sp.poste, count(distinct(sp.email)) AS nb"; |
| 132 | 132 | $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; |
| 133 | 133 | $sql .= " WHERE sp.entity IN (".getEntity('contact').")"; |
| 134 | - $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 134 | + $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 135 | 135 | $sql .= " AND sp.statut = 1"; |
| 136 | 136 | $sql .= " AND (sp.poste IS NOT NULL AND sp.poste <> '')"; |
| 137 | 137 | $sql .= " GROUP BY sp.poste"; |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $sql .= " ".MAIN_DB_PREFIX."categorie as c,"; |
| 167 | 167 | $sql .= " ".MAIN_DB_PREFIX."categorie_contact as cs"; |
| 168 | 168 | $sql .= " WHERE sp.entity IN (".getEntity('contact').")"; |
| 169 | - $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 169 | + $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 170 | 170 | $sql .= " AND sp.statut = 1"; |
| 171 | 171 | $sql .= " AND cs.fk_categorie = c.rowid"; |
| 172 | 172 | $sql .= " AND cs.fk_socpeople = sp.rowid"; |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $sql .= " ".MAIN_DB_PREFIX."categorie as c,"; |
| 240 | 240 | $sql .= " ".MAIN_DB_PREFIX."categorie_societe as cs"; |
| 241 | 241 | $sql .= " WHERE sp.entity IN (".getEntity('contact').")"; |
| 242 | - $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 242 | + $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 243 | 243 | $sql .= " AND sp.statut = 1"; |
| 244 | 244 | $sql .= " AND cs.fk_categorie = c.rowid"; |
| 245 | 245 | $sql .= " AND cs.fk_soc = sp.fk_soc"; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $sql .= " ".MAIN_DB_PREFIX."categorie as c,"; |
| 277 | 277 | $sql .= " ".MAIN_DB_PREFIX."categorie_fournisseur as cs"; |
| 278 | 278 | $sql .= " WHERE sp.entity IN (".getEntity('contact').")"; |
| 279 | - $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 279 | + $sql .= " AND sp.email <> ''"; // Note that null != '' is false |
|
| 280 | 280 | $sql .= " AND sp.statut = 1"; |
| 281 | 281 | $sql .= " AND cs.fk_categorie = c.rowid"; |
| 282 | 282 | $sql .= " AND cs.fk_soc = sp.fk_soc"; |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | |
| 435 | 435 | // Filter on job position |
| 436 | 436 | $key = $filter_jobposition; |
| 437 | - if (!empty($key) && $key != 'all' && $key != '-1') { |
|
| 437 | + if (!empty($key) && $key != 'all' && $key != '-1') { |
|
| 438 | 438 | $sql .= " AND sp.poste = '".$this->db->escape($key)."'"; |
| 439 | 439 | } |
| 440 | 440 | |
@@ -426,7 +426,7 @@ |
||
| 426 | 426 | $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentcandidature_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
| 427 | 427 | |
| 428 | 428 | $morehtmlref = '<div class="refidno">'; |
| 429 | - $morehtmlref.= $object->getFullName('', 1); |
|
| 429 | + $morehtmlref .= $object->getFullName('', 1); |
|
| 430 | 430 | /* |
| 431 | 431 | // Ref customer |
| 432 | 432 | $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentcandidature_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
| 144 | 144 | |
| 145 | 145 | $morehtmlref = '<div class="refidno">'; |
| 146 | - $morehtmlref.= $object->getFullName('', 1); |
|
| 146 | + $morehtmlref .= $object->getFullName('', 1); |
|
| 147 | 147 | /* |
| 148 | 148 | // Ref customer |
| 149 | 149 | $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentjobposition_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
| 97 | 97 | |
| 98 | 98 | $morehtmlref = '<div class="refidno">'; |
| 99 | - $morehtmlref.= $object->getFullName('', 1); |
|
| 99 | + $morehtmlref .= $object->getFullName('', 1); |
|
| 100 | 100 | /* |
| 101 | 101 | // Ref customer |
| 102 | 102 | $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
@@ -426,7 +426,7 @@ |
||
| 426 | 426 | $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentcandidature_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
| 427 | 427 | |
| 428 | 428 | $morehtmlref = '<div class="refidno">'; |
| 429 | - $morehtmlref.= $object->getFullName('', 1); |
|
| 429 | + $morehtmlref .= $object->getFullName('', 1); |
|
| 430 | 430 | /* |
| 431 | 431 | // Ref customer |
| 432 | 432 | $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | // $type = "GIF" | "JPEG" |
| 136 | 136 | //$this->properties["PHOTO;MEDIATYPE=$type;ENCODING=BASE64"] = base64_encode($photo); |
| 137 | - $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
| 137 | + $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
| 138 | 138 | //$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo); // must be content of image |
| 139 | 139 | } |
| 140 | 140 | |
@@ -356,10 +356,10 @@ discard block |
||
| 356 | 356 | public function getVCard() |
| 357 | 357 | { |
| 358 | 358 | $text = "BEGIN:VCARD\r\n"; |
| 359 | - $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
| 359 | + $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
| 360 | 360 | //$text.= "VERSION:2.1\r\n"; |
| 361 | 361 | foreach ($this->properties as $key => $value) { |
| 362 | - $newkey = preg_replace('/-.*$/', '', $key); // remove suffix -twitter, -facebook, ... |
|
| 362 | + $newkey = preg_replace('/-.*$/', '', $key); // remove suffix -twitter, -facebook, ... |
|
| 363 | 363 | $text .= $newkey.":".$value."\r\n"; |
| 364 | 364 | } |
| 365 | 365 | $text .= "REV:".date("Ymd")."T".date("His")."Z\r\n"; |