@@ -152,7 +152,9 @@ |
||
152 | 152 | accessforbidden(); |
153 | 153 | } |
154 | 154 | $result = restrictedArea($user, 'eventorganization'); |
155 | -if (!$permissiontoread) accessforbidden(); |
|
155 | +if (!$permissiontoread) { |
|
156 | + accessforbidden(); |
|
157 | +} |
|
156 | 158 | |
157 | 159 | |
158 | 160 | /* |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | $langs->loadLangs(array("eventorganization", "other", "projects", "bills")); |
46 | 46 | |
47 | 47 | // Get Paramters |
48 | -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
49 | -$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
50 | -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? |
|
51 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
52 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
53 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
48 | +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
49 | +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
50 | +$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? |
|
51 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
52 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
53 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
54 | 54 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
55 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
56 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
55 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
56 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
57 | 57 | $mode = GETPOST('mode', 'aZ'); |
58 | 58 | |
59 | 59 | $id = GETPOST('id', 'int'); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $fk_project = GETPOST('fk_project', 'int') ? GETPOST('fk_project', 'int') : GETPOST('projectid', 'int'); |
64 | 64 | $projectid = $fk_project; |
65 | 65 | |
66 | -$withProjectUrl=''; |
|
66 | +$withProjectUrl = ''; |
|
67 | 67 | |
68 | 68 | // Load variable for pagination |
69 | 69 | $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | // Default sort order (if not yet defined by previous GETPOST) |
95 | 95 | if (!$sortfield) { |
96 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
96 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
97 | 97 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
98 | 98 | } |
99 | 99 | if (!$sortorder) { |
@@ -167,14 +167,14 @@ discard block |
||
167 | 167 | if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) { |
168 | 168 | $project = new Project($db); |
169 | 169 | //If "set" fields keys is in projects fields |
170 | - $project_attr=preg_replace('/^set/', '', $action); |
|
170 | + $project_attr = preg_replace('/^set/', '', $action); |
|
171 | 171 | if (array_key_exists($project_attr, $project->fields)) { |
172 | 172 | $result = $project->fetch($projectid); |
173 | 173 | if ($result < 0) { |
174 | 174 | setEventMessages(null, $project->errors, 'errors'); |
175 | 175 | } else { |
176 | - $project->{$project_attr}=GETPOST($project_attr); |
|
177 | - $result=$project->update($user); |
|
176 | + $project->{$project_attr} = GETPOST($project_attr); |
|
177 | + $result = $project->update($user); |
|
178 | 178 | if ($result < 0) { |
179 | 179 | setEventMessages(null, $project->errors, 'errors'); |
180 | 180 | } |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $projectstatic->fetch_thirdparty(); |
401 | 401 | } |
402 | 402 | |
403 | - $withProjectUrl=''; |
|
403 | + $withProjectUrl = ''; |
|
404 | 404 | $object->project = clone $projectstatic; |
405 | 405 | |
406 | 406 | if (!empty($withproject)) { |
@@ -656,12 +656,12 @@ discard block |
||
656 | 656 | print '<div class="fichecenter">'; |
657 | 657 | print '<div class="fichehalfleft">'; |
658 | 658 | print '<div class="underbanner clearboth"></div>'; |
659 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
659 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
660 | 660 | |
661 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; |
|
661 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
|
662 | 662 | |
663 | 663 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
664 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
664 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
665 | 665 | $object = $object_evt; |
666 | 666 | print '</table>'; |
667 | 667 | print '</div>'; |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | } |
734 | 734 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
735 | 735 | |
736 | -print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($conf_or_booth_id)?'?conforboothid='.$conf_or_booth_id:'').'">'."\n"; |
|
736 | +print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].(!empty($conf_or_booth_id) ? '?conforboothid='.$conf_or_booth_id : '').'">'."\n"; |
|
737 | 737 | if ($optioncss != '') { |
738 | 738 | print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
739 | 739 | } |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | $params = array('morecss'=>'reposition'); |
753 | 753 | |
754 | 754 | $newcardbutton = ''; |
755 | -$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').(!empty($projectstatic->id)?'&fk_project='.$projectstatic->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd, $params); |
|
755 | +$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id) ? '&conforboothid='.$confOrBooth->id : '').(!empty($projectstatic->id) ? '&fk_project='.$projectstatic->id : '').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.(empty($confOrBooth->id) ? '' : '&conforboothid='.$confOrBooth->id).$withProjectUrl), '', $permissiontoadd, $params); |
|
756 | 756 | |
757 | 757 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); |
758 | 758 | |
@@ -889,7 +889,7 @@ discard block |
||
889 | 889 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
890 | 890 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
891 | 891 | } |
892 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
892 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
893 | 893 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
894 | 894 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
895 | 895 | $totalarray['nbfield']++; |
@@ -1000,9 +1000,9 @@ discard block |
||
1000 | 1000 | if ($key == 'status') { |
1001 | 1001 | print $object->getLibStatut(5); |
1002 | 1002 | } elseif ($key == 'ref') { |
1003 | - $optionLink = (!empty($withproject)?'conforboothidproject':'conforboothid'); |
|
1003 | + $optionLink = (!empty($withproject) ? 'conforboothidproject' : 'conforboothid'); |
|
1004 | 1004 | if (empty($confOrBooth->id)) { |
1005 | - $optionLink='projectid'; |
|
1005 | + $optionLink = 'projectid'; |
|
1006 | 1006 | } |
1007 | 1007 | print $object->getNomUrl(1, $optionLink); |
1008 | 1008 | } else { |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $result = $object->fetch($id); |
48 | 48 | if (!$result) dol_print_error($db, 'Failed to get payment id '.$id); |
49 | 49 | } |
50 | -restrictedArea($user, 'salaries', $object->fk_salary, 'salary', ''); // $object is payment of salary |
|
50 | +restrictedArea($user, 'salaries', $object->fk_salary, 'salary', ''); // $object is payment of salary |
|
51 | 51 | |
52 | 52 | |
53 | 53 | /* |
@@ -41,15 +41,19 @@ |
||
41 | 41 | $id = GETPOST("id", 'int'); |
42 | 42 | $action = GETPOST('action', 'aZ09'); |
43 | 43 | $confirm = GETPOST('confirm'); |
44 | -if ($user->socid) $socid = $user->socid; |
|
44 | +if ($user->socid) { |
|
45 | + $socid = $user->socid; |
|
46 | +} |
|
45 | 47 | |
46 | 48 | $salary = new Salary($db); |
47 | 49 | |
48 | 50 | $object = new PaymentSalary($db); |
49 | 51 | if ($id > 0) { |
50 | 52 | $result = $object->fetch($id); |
51 | - if (!$result) dol_print_error($db, 'Failed to get payment id '.$id); |
|
52 | -} |
|
53 | + if (!$result) { |
|
54 | + dol_print_error($db, 'Failed to get payment id '.$id); |
|
55 | + } |
|
56 | + } |
|
53 | 57 | restrictedArea($user, 'salaries', $object->fk_salary, 'salary', ''); // $object is payment of salary |
54 | 58 | |
55 | 59 |
@@ -126,8 +126,8 @@ |
||
126 | 126 | public $usage_bill_time; // Is the time spent on project must be invoiced or not |
127 | 127 | |
128 | 128 | /** |
129 | - * @var integer Event organization: Use Event Organization |
|
130 | - */ |
|
129 | + * @var integer Event organization: Use Event Organization |
|
130 | + */ |
|
131 | 131 | public $usage_organize_event; |
132 | 132 | |
133 | 133 | /** |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | $label = $langs->trans("ShowProject"); |
1373 | 1373 | $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
1374 | 1374 | } |
1375 | - $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
1375 | + $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); |
|
1376 | 1376 | $linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"'; |
1377 | 1377 | } else { |
1378 | 1378 | $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); |
@@ -1739,7 +1739,7 @@ discard block |
||
1739 | 1739 | |
1740 | 1740 | foreach (array('internal', 'external') as $source) { |
1741 | 1741 | $tab = $origin_project->liste_contact(-1, $source); |
1742 | - if (is_array($tab) && count($tab)>0) { |
|
1742 | + if (is_array($tab) && count($tab) > 0) { |
|
1743 | 1743 | foreach ($tab as $contacttoadd) { |
1744 | 1744 | $clone_project->add_contact($contacttoadd['id'], $contacttoadd['code'], $contacttoadd['source'], $notrigger); |
1745 | 1745 | if ($clone_project->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { |
@@ -1924,7 +1924,7 @@ discard block |
||
1924 | 1924 | if ($tableName == "actioncomm") { |
1925 | 1925 | $sql .= " SET fk_project=".$this->id; |
1926 | 1926 | $sql .= " WHERE id=".((int) $elementSelectId); |
1927 | - } elseif (in_array($tableName, ["entrepot","mrp_mo"])) { |
|
1927 | + } elseif (in_array($tableName, ["entrepot", "mrp_mo"])) { |
|
1928 | 1928 | $sql .= " SET fk_project=".$this->id; |
1929 | 1929 | $sql .= " WHERE rowid=".((int) $elementSelectId); |
1930 | 1930 | } else { |
@@ -2361,7 +2361,7 @@ discard block |
||
2361 | 2361 | require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
2362 | 2362 | $taskstatic = new Task($this->db); |
2363 | 2363 | |
2364 | - $this->lines = $taskstatic->getTasksArray(0, $user, $this->id, 0, 0, '', '-1', '', 0, 0, array(), 0, array(), 0, $loadRoleMode); |
|
2364 | + $this->lines = $taskstatic->getTasksArray(0, $user, $this->id, 0, 0, '', '-1', '', 0, 0, array(), 0, array(), 0, $loadRoleMode); |
|
2365 | 2365 | return 1; |
2366 | 2366 | } |
2367 | 2367 |
@@ -286,19 +286,19 @@ |
||
286 | 286 | |
287 | 287 | // sort list |
288 | 288 | if ($sortfield == "name" && $sortorder == "asc") { |
289 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
289 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
290 | 290 | return strcasecmp($a->name, $b->name); |
291 | 291 | }); |
292 | 292 | } elseif ($sortfield == "name" && $sortorder == "desc") { |
293 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
293 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
294 | 294 | return strcasecmp($b->name, $a->name); |
295 | 295 | }); |
296 | 296 | } elseif ($sortfield == "version" && $sortorder == "asc") { |
297 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
297 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
298 | 298 | return strcasecmp($a->version, $b->version); |
299 | 299 | }); |
300 | 300 | } elseif ($sortfield == "version" && $sortorder == "desc") { |
301 | - usort($moduleList, function (stdClass $a, stdClass $b) { |
|
301 | + usort($moduleList, function(stdClass $a, stdClass $b) { |
|
302 | 302 | return strcasecmp($b->version, $a->version); |
303 | 303 | }); |
304 | 304 | } elseif ($sortfield == "id" && $sortorder == "asc") { |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | return $solde; |
417 | 417 | } |
418 | 418 | |
419 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
419 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
420 | 420 | /** |
421 | 421 | * Total of the VAT from invoices emitted by the thirdparty. |
422 | 422 | * |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | */ |
426 | 426 | public function tva_sum_collectee($year = 0) |
427 | 427 | { |
428 | - // phpcs:enable |
|
428 | + // phpcs:enable |
|
429 | 429 | |
430 | 430 | $sql = "SELECT sum(f.total_tva) as amount"; |
431 | 431 | $sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1"; |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | } |
451 | 451 | } |
452 | 452 | |
453 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
453 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
454 | 454 | /** |
455 | 455 | * VAT payed |
456 | 456 | * |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | */ |
460 | 460 | public function tva_sum_payee($year = 0) |
461 | 461 | { |
462 | - // phpcs:enable |
|
462 | + // phpcs:enable |
|
463 | 463 | |
464 | 464 | $sql = "SELECT sum(f.total_tva) as total_tva"; |
465 | 465 | $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | } |
486 | 486 | |
487 | 487 | |
488 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
488 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
489 | 489 | /** |
490 | 490 | * Total of the VAT payed |
491 | 491 | * |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | */ |
495 | 495 | public function tva_sum_reglee($year = 0) |
496 | 496 | { |
497 | - // phpcs:enable |
|
497 | + // phpcs:enable |
|
498 | 498 | |
499 | 499 | $sql = "SELECT sum(f.amount) as amount"; |
500 | 500 | $sql .= " FROM ".MAIN_DB_PREFIX."tva as f"; |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | } |
666 | 666 | } |
667 | 667 | |
668 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
668 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
669 | 669 | /** |
670 | 670 | * Update link between payment tva and line generate into llx_bank |
671 | 671 | * |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | */ |
675 | 675 | public function update_fk_bank($id_bank) |
676 | 676 | { |
677 | - // phpcs:enable |
|
677 | + // phpcs:enable |
|
678 | 678 | $sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.(int) $id_bank; |
679 | 679 | $sql .= ' WHERE rowid = '.(int) $this->id; |
680 | 680 | $result = $this->db->query($sql); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * \brief Popup screen to validate VAT |
22 | 22 | */ |
23 | 23 | |
24 | -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
24 | +if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
25 | 25 | |
26 | 26 | require "../../main.inc.php"; |
27 | 27 | require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
@@ -21,7 +21,10 @@ |
||
21 | 21 | * \brief Popup screen to validate VAT |
22 | 22 | */ |
23 | 23 | |
24 | -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
24 | +if (! defined('NOTOKENRENEWAL')) { |
|
25 | + define('NOTOKENRENEWAL', '1'); |
|
26 | +} |
|
27 | +// Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
25 | 28 | |
26 | 29 | require "../../main.inc.php"; |
27 | 30 | require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $socid = $user->socid; |
80 | 80 | } |
81 | 81 | |
82 | -$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
82 | +$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known |
|
83 | 83 | |
84 | 84 | |
85 | 85 |
@@ -121,7 +121,7 @@ |
||
121 | 121 | $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd"; |
122 | 122 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; |
123 | 123 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
124 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
124 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
125 | 125 | } |
126 | 126 | $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; |
127 | 127 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | 'p.fk_product_type'=>'Type', 'p.tosell'=>"OnSell", 'p.tobuy'=>"OnBuy", |
155 | 155 | 'p.description'=>"Description", 'p.url'=>"PublicUrl", |
156 | 156 | 'p.customcode'=>'CustomCode', 'p.fk_country'=>'IDCountry', |
157 | - $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
158 | - $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
159 | - $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
157 | + $alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
158 | + $alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
159 | + $alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
160 | 160 | 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', |
161 | 161 | 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.surface'=>"Surface", 'p.volume'=>"Volume", |
162 | 162 | 'p.duration'=>"Duration", |
@@ -197,8 +197,8 @@ discard block |
||
197 | 197 | 'p.ref'=>"Text", 'p.label'=>"Text", |
198 | 198 | 'p.fk_product_type'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", |
199 | 199 | 'p.description'=>"Text", 'p.url'=>"Text", |
200 | - $alias_product_perentity . '.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", |
|
201 | - $alias_product_perentity . '.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", |
|
200 | + $alias_product_perentity.'.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text", |
|
201 | + $alias_product_perentity.'.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text", |
|
202 | 202 | 'p.note'=>"Text", 'p.note_public'=>"Text", |
203 | 203 | 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.width'=>"Numeric", 'p.height'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", |
204 | 204 | 'p.customcode'=>'Text', |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | $this->export_dependencies_array[$r] = array('category'=>'p.rowid'); |
258 | 258 | } |
259 | 259 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
260 | - $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
260 | + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
261 | 261 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
262 | - $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
262 | + $this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
263 | 263 | } |
264 | 264 | if (!empty($conf->global->EXPORTTOOL_CATEGORIES)) { |
265 | 265 | $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product = p.rowid LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cp.fk_categorie = cat.rowid'; |
@@ -352,9 +352,9 @@ discard block |
||
352 | 352 | $this->export_permission[$r] = array(array("service", "export")); |
353 | 353 | $this->export_fields_array[$r] = array( |
354 | 354 | 'p.rowid'=>"Id", 'p.ref'=>"Ref", 'p.label'=>"Label", 'p.description'=>"Description", 'p.url'=>"PublicUrl", |
355 | - $alias_product_perentity . '.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity . '.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
356 | - $alias_product_perentity . '.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity . '.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
357 | - $alias_product_perentity . '.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity . '.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
355 | + $alias_product_perentity.'.accountancy_code_sell'=>"ProductAccountancySellCode", $alias_product_perentity.'.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode", |
|
356 | + $alias_product_perentity.'.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", $alias_product_perentity.'.accountancy_code_buy'=>"ProductAccountancyBuyCode", |
|
357 | + $alias_product_perentity.'.accountancy_code_buy_intra'=>"ProductAccountancyBuyIntraCode", $alias_product_perentity.'.accountancy_code_buy_export'=>"ProductAccountancyBuyExportCode", |
|
358 | 358 | 'p.note'=>"NotePrivate", 'p.note_public'=>'NotePublic', |
359 | 359 | 'p.weight'=>"Weight", 'p.length'=>"Length", 'p.surface'=>"Surface", 'p.volume'=>"Volume", 'p.customcode'=>'CustomCode', |
360 | 360 | 'p.price_base_type'=>"PriceBase", 'p.price'=>"UnitPriceHT", 'p.price_ttc'=>"UnitPriceTTC", 'p.tva_tx'=>'VATRate', 'p.tosell'=>"OnSell", |
@@ -369,8 +369,8 @@ discard block |
||
369 | 369 | $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('pa.qty'=>'Qty', 'pa.incdec'=>'ComposedProductIncDecStock')); |
370 | 370 | $this->export_TypeFields_array[$r] = array( |
371 | 371 | 'p.ref'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.url'=>"Text", |
372 | - $alias_product_perentity . 'p.accountancy_code_sell'=>"Text", $alias_product_perentity . '.accountancy_code_sell_intra'=>"Text", $alias_product_perentity . '.accountancy_code_sell_export'=>"Text", |
|
373 | - $alias_product_perentity . 'p.accountancy_code_buy'=>"Text", $alias_product_perentity . '.accountancy_code_buy_intra'=>"Text", $alias_product_perentity . '.accountancy_code_buy_export'=>"Text", |
|
372 | + $alias_product_perentity.'p.accountancy_code_sell'=>"Text", $alias_product_perentity.'.accountancy_code_sell_intra'=>"Text", $alias_product_perentity.'.accountancy_code_sell_export'=>"Text", |
|
373 | + $alias_product_perentity.'p.accountancy_code_buy'=>"Text", $alias_product_perentity.'.accountancy_code_buy_intra'=>"Text", $alias_product_perentity.'.accountancy_code_buy_export'=>"Text", |
|
374 | 374 | 'p.note'=>"Text", 'p.note_public'=>"Text", |
375 | 375 | 'p.weight'=>"Numeric", 'p.length'=>"Numeric", 'p.surface'=>"Numeric", 'p.volume'=>"Numeric", 'p.customcode'=>'Text', |
376 | 376 | 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", |
@@ -385,8 +385,8 @@ discard block |
||
385 | 385 | $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('pa.qty'=>'Numeric')); |
386 | 386 | $this->export_entities_array[$r] = array( |
387 | 387 | 'p.rowid'=>"virtualproduct", 'p.ref'=>"virtualproduct", 'p.label'=>"virtualproduct", 'p.description'=>"virtualproduct", 'p.url'=>"virtualproduct", |
388 | - $alias_product_perentity . '.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_sell_export'=>'virtualproduct', |
|
389 | - $alias_product_perentity . '.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity . '.accountancy_code_buy_export'=>'virtualproduct', |
|
388 | + $alias_product_perentity.'.accountancy_code_sell'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_sell_export'=>'virtualproduct', |
|
389 | + $alias_product_perentity.'.accountancy_code_buy'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_intra'=>'virtualproduct', $alias_product_perentity.'.accountancy_code_buy_export'=>'virtualproduct', |
|
390 | 390 | 'p.note'=>"virtualproduct", 'p.length'=>"virtualproduct", |
391 | 391 | 'p.surface'=>"virtualproduct", 'p.volume'=>"virtualproduct", 'p.weight'=>"virtualproduct", 'p.customcode'=>'virtualproduct', |
392 | 392 | 'p.price_base_type'=>"virtualproduct", 'p.price'=>"virtualproduct", 'p.price_ttc'=>"virtualproduct", 'p.tva_tx'=>"virtualproduct", |
@@ -406,9 +406,9 @@ discard block |
||
406 | 406 | $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid'=>"Id", 'p2.ref'=>"Ref", 'p2.label'=>"Label", 'p2.description'=>"Description")); |
407 | 407 | $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid'=>"subproduct", 'p2.ref'=>"subproduct", 'p2.label'=>"subproduct", 'p2.description'=>"subproduct")); |
408 | 408 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
409 | - $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
409 | + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p'; |
|
410 | 410 | if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) { |
411 | - $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = " . ((int) $conf->entity); |
|
411 | + $this->export_sql_end[$r] .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = ".((int) $conf->entity); |
|
412 | 412 | } |
413 | 413 | $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON p.rowid = extra.fk_object,'; |
414 | 414 | $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'product_association as pa, '.MAIN_DB_PREFIX.'product as p2'; |