@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @var string Prefix to check for any trigger code of any business class to prevent bad value for trigger code. |
| 63 | 63 | * @see CommonTrigger::call_trigger() |
| 64 | 64 | */ |
| 65 | - public $TRIGGER_PREFIX = 'COMPANY'; // to be overridden in child class implementations, i.e. 'BILL', 'TASK', 'PROPAL', etc. |
|
| 65 | + public $TRIGGER_PREFIX = 'COMPANY'; // to be overridden in child class implementations, i.e. 'BILL', 'TASK', 'PROPAL', etc. |
|
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | 68 | * @var string ID of module. |
@@ -1097,8 +1097,8 @@ discard block |
||
| 1097 | 1097 | $sql .= ", ".(empty($this->ip) ? "null" : "'".$this->db->escape($this->ip)."'"); |
| 1098 | 1098 | if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 1099 | 1099 | $sql .= ", ".(empty($this->vat_reverse_charge) ? '0' : '1'); |
| 1100 | - $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; |
|
| 1101 | - $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; |
|
| 1100 | + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; |
|
| 1101 | + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; |
|
| 1102 | 1102 | } |
| 1103 | 1103 | $sql .= ")"; |
| 1104 | 1104 | |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | } |
| 1152 | 1152 | |
| 1153 | 1153 | if ($ret >= 0) { |
| 1154 | - if (! $notrigger) { |
|
| 1154 | + if (!$notrigger) { |
|
| 1155 | 1155 | // Call trigger |
| 1156 | 1156 | $result = $this->call_trigger('COMPANY_CREATE', $user); |
| 1157 | 1157 | if ($result < 0) { |
@@ -1395,7 +1395,7 @@ discard block |
||
| 1395 | 1395 | if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { |
| 1396 | 1396 | $langs->loadLangs(array("errors", 'compta')); |
| 1397 | 1397 | $error++; |
| 1398 | - $this->errors[] = $langs->trans('CustomerAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1398 | + $this->errors[] = $langs->trans('CustomerAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1399 | 1399 | } |
| 1400 | 1400 | } |
| 1401 | 1401 | |
@@ -1403,7 +1403,7 @@ discard block |
||
| 1403 | 1403 | if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) { |
| 1404 | 1404 | $langs->loadLangs(array("errors", 'compta')); |
| 1405 | 1405 | $error++; |
| 1406 | - $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1406 | + $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1407 | 1407 | } |
| 1408 | 1408 | } elseif ($key == 'ACCOUNTANCY_CODE_SUPPLIER' && !empty($this->fournisseur)) { |
| 1409 | 1409 | // Check for unicity |
@@ -1411,7 +1411,7 @@ discard block |
||
| 1411 | 1411 | if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { |
| 1412 | 1412 | $langs->loadLangs(array("errors", 'compta')); |
| 1413 | 1413 | $error++; |
| 1414 | - $this->errors[] = $langs->trans('SupplierAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1414 | + $this->errors[] = $langs->trans('SupplierAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1415 | 1415 | } |
| 1416 | 1416 | } |
| 1417 | 1417 | |
@@ -1419,7 +1419,7 @@ discard block |
||
| 1419 | 1419 | if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_SUPPLIER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) { |
| 1420 | 1420 | $langs->loadLangs(array("errors", 'compta')); |
| 1421 | 1421 | $error++; |
| 1422 | - $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
| 1422 | + $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
| 1423 | 1423 | } |
| 1424 | 1424 | } |
| 1425 | 1425 | } |
@@ -1469,17 +1469,17 @@ discard block |
||
| 1469 | 1469 | $now = dol_now(); |
| 1470 | 1470 | |
| 1471 | 1471 | // Clean parameters |
| 1472 | - $this->id = $id; |
|
| 1473 | - $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); |
|
| 1472 | + $this->id = $id; |
|
| 1473 | + $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); |
|
| 1474 | 1474 | $this->name = $this->name ? trim($this->name) : trim((string) $this->nom); |
| 1475 | 1475 | $this->nom = $this->name; // For backward compatibility |
| 1476 | - $this->name_alias = trim((string) $this->name_alias); |
|
| 1476 | + $this->name_alias = trim((string) $this->name_alias); |
|
| 1477 | 1477 | $this->ref_ext = (empty($this->ref_ext) ? '' : trim($this->ref_ext)); |
| 1478 | 1478 | $this->address = trim((string) $this->address); |
| 1479 | 1479 | $this->zip = trim((string) $this->zip); |
| 1480 | 1480 | $this->town = trim((string) $this->town); |
| 1481 | - $this->state_id = (is_numeric($this->state_id)) ? (int) $this->state_id : 0; |
|
| 1482 | - $this->country_id = ($this->country_id > 0) ? $this->country_id : 0; |
|
| 1481 | + $this->state_id = (is_numeric($this->state_id)) ? (int) $this->state_id : 0; |
|
| 1482 | + $this->country_id = ($this->country_id > 0) ? $this->country_id : 0; |
|
| 1483 | 1483 | $this->phone = trim((string) $this->phone); |
| 1484 | 1484 | $this->phone = preg_replace("/\s/", "", $this->phone); |
| 1485 | 1485 | $this->phone = preg_replace("/\./", "", $this->phone); |
@@ -1489,7 +1489,7 @@ discard block |
||
| 1489 | 1489 | $this->fax = trim((string) $this->fax); |
| 1490 | 1490 | $this->fax = preg_replace("/\s/", "", $this->fax); |
| 1491 | 1491 | $this->fax = preg_replace("/\./", "", $this->fax); |
| 1492 | - $this->email = trim((string) $this->email); |
|
| 1492 | + $this->email = trim((string) $this->email); |
|
| 1493 | 1493 | $this->url = $this->url ? clean_url($this->url, 0) : ''; |
| 1494 | 1494 | $this->note_private = (empty($this->note_private) ? '' : trim($this->note_private)); |
| 1495 | 1495 | $this->note_public = (empty($this->note_public) ? '' : trim($this->note_public)); |
@@ -1658,7 +1658,7 @@ discard block |
||
| 1658 | 1658 | $sql .= ",tva_assuj = ".($this->tva_assuj != '' ? "'".$this->db->escape((string) $this->tva_assuj)."'" : "null"); |
| 1659 | 1659 | $sql .= ",tva_intra = '".$this->db->escape($this->tva_intra)."'"; |
| 1660 | 1660 | if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 1661 | - $sql .= ",vat_reverse_charge = " . ($this->vat_reverse_charge != '' ? "'" . $this->db->escape((string) $this->vat_reverse_charge) . "'" : 0); |
|
| 1661 | + $sql .= ",vat_reverse_charge = ".($this->vat_reverse_charge != '' ? "'".$this->db->escape((string) $this->vat_reverse_charge)."'" : 0); |
|
| 1662 | 1662 | } |
| 1663 | 1663 | $sql .= ",status = ".((int) $this->status); |
| 1664 | 1664 | |
@@ -1720,8 +1720,8 @@ discard block |
||
| 1720 | 1720 | $sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount != '' ? $this->supplier_order_min_amount : 'null'); |
| 1721 | 1721 | $sql .= ",fk_prospectlevel='".$this->db->escape($this->fk_prospectlevel)."'"; |
| 1722 | 1722 | if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 1723 | - $sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'"; |
|
| 1724 | - $sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'"; |
|
| 1723 | + $sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'"; |
|
| 1724 | + $sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'"; |
|
| 1725 | 1725 | if ($customer) { |
| 1726 | 1726 | $sql .= ", accountancy_code_customer_general = ".(!empty($this->accountancy_code_customer_general) ? "'".$this->db->escape($this->accountancy_code_customer_general)."'" : "null"); |
| 1727 | 1727 | $sql .= ", code_compta = ".(!empty($this->code_compta_client) ? "'".$this->db->escape($this->code_compta_client)."'" : "null"); |
@@ -2120,7 +2120,7 @@ discard block |
||
| 2120 | 2120 | $this->vat_reverse_charge = 0; |
| 2121 | 2121 | } |
| 2122 | 2122 | |
| 2123 | - $this->status = $obj->status; |
|
| 2123 | + $this->status = $obj->status; |
|
| 2124 | 2124 | |
| 2125 | 2125 | // Local Taxes |
| 2126 | 2126 | $this->localtax1_assuj = $obj->localtax1_assuj; |
@@ -2148,7 +2148,7 @@ discard block |
||
| 2148 | 2148 | |
| 2149 | 2149 | $this->mode_reglement_id = $obj->mode_reglement; |
| 2150 | 2150 | $this->cond_reglement_id = $obj->cond_reglement; |
| 2151 | - $this->deposit_percent = $obj->deposit_percent; |
|
| 2151 | + $this->deposit_percent = $obj->deposit_percent; |
|
| 2152 | 2152 | $this->transport_mode_id = $obj->transport_mode; |
| 2153 | 2153 | $this->mode_reglement_supplier_id = $obj->mode_reglement_supplier; |
| 2154 | 2154 | $this->cond_reglement_supplier_id = $obj->cond_reglement_supplier; |
@@ -2313,7 +2313,7 @@ discard block |
||
| 2313 | 2313 | } |
| 2314 | 2314 | |
| 2315 | 2315 | if ($sqlprof) { |
| 2316 | - $sqlprofquery = $sqlstart . " AND (".$sqlprof." )"; |
|
| 2316 | + $sqlprofquery = $sqlstart." AND (".$sqlprof." )"; |
|
| 2317 | 2317 | $resql = $this->db->query($sqlprofquery); |
| 2318 | 2318 | if ($resql) { |
| 2319 | 2319 | $num = $this->db->num_rows($resql); |
@@ -2366,7 +2366,7 @@ discard block |
||
| 2366 | 2366 | } |
| 2367 | 2367 | |
| 2368 | 2368 | if ($sqlref) { |
| 2369 | - $sqlrefquery = $sqlstart . " AND (".$sqlref." )"; |
|
| 2369 | + $sqlrefquery = $sqlstart." AND (".$sqlref." )"; |
|
| 2370 | 2370 | $resql = $this->db->query($sqlrefquery); |
| 2371 | 2371 | if ($resql) { |
| 2372 | 2372 | $num = $this->db->num_rows($resql); |
@@ -2885,7 +2885,7 @@ discard block |
||
| 2885 | 2885 | $sortfield = 'u.lastname,u.firstname'; |
| 2886 | 2886 | } |
| 2887 | 2887 | if (empty($sortorder)) { |
| 2888 | - $sortorder = str_repeat('ASC,', count(explode(',', $sortfield)) - 1) . 'ASC'; |
|
| 2888 | + $sortorder = str_repeat('ASC,', count(explode(',', $sortfield)) - 1).'ASC'; |
|
| 2889 | 2889 | } |
| 2890 | 2890 | $sql .= $this->db->order($sortfield, $sortorder); |
| 2891 | 2891 | |
@@ -2902,10 +2902,10 @@ discard block |
||
| 2902 | 2902 | $reparray[$i]['firstname'] = $obj->firstname; |
| 2903 | 2903 | $reparray[$i]['email'] = $obj->email; |
| 2904 | 2904 | $reparray[$i]['phone'] = $obj->office_phone; |
| 2905 | - $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
| 2905 | + $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
| 2906 | 2906 | $reparray[$i]['office_fax'] = $obj->office_fax; |
| 2907 | - $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
| 2908 | - $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
| 2907 | + $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
| 2908 | + $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
| 2909 | 2909 | $reparray[$i]['job'] = $obj->job; |
| 2910 | 2910 | $reparray[$i]['statut'] = $obj->status; // deprecated |
| 2911 | 2911 | $reparray[$i]['status'] = $obj->status; |
@@ -3116,7 +3116,7 @@ discard block |
||
| 3116 | 3116 | $datas['status'] = ' '.$this->getLibStatut(5); |
| 3117 | 3117 | } |
| 3118 | 3118 | if (isset($this->client) && isset($this->fournisseur)) { |
| 3119 | - $datas['type'] = ' ' . $this->getTypeUrl(1, '', 0, 'span'); |
|
| 3119 | + $datas['type'] = ' '.$this->getTypeUrl(1, '', 0, 'span'); |
|
| 3120 | 3120 | } |
| 3121 | 3121 | $datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name)); |
| 3122 | 3122 | if (!empty($this->name_alias) && empty($noaliasinname)) { |
@@ -3184,9 +3184,9 @@ discard block |
||
| 3184 | 3184 | } |
| 3185 | 3185 | // show categories for this record only in ajax to not overload lists |
| 3186 | 3186 | if (!$nofetch && isModEnabled('category') && $this->client) { |
| 3187 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 3187 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 3188 | 3188 | $form = new Form($this->db); |
| 3189 | - $datas['categories_customer'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1); |
|
| 3189 | + $datas['categories_customer'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1); |
|
| 3190 | 3190 | } |
| 3191 | 3191 | if (!empty($this->code_fournisseur) && $this->fournisseur) { |
| 3192 | 3192 | $datas['suppliercode'] = '<br><b>'.$langs->trans('SupplierCode').':</b> '.$this->code_fournisseur; |
@@ -3197,9 +3197,9 @@ discard block |
||
| 3197 | 3197 | } |
| 3198 | 3198 | // show categories for this record only in ajax to not overload lists |
| 3199 | 3199 | if (!$nofetch && isModEnabled('category') && $this->fournisseur) { |
| 3200 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 3200 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 3201 | 3201 | $form = new Form($this->db); |
| 3202 | - $datas['categories_supplier'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1); |
|
| 3202 | + $datas['categories_supplier'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1); |
|
| 3203 | 3203 | } |
| 3204 | 3204 | |
| 3205 | 3205 | $datas['divclose'] = '</div>'; |
@@ -3746,7 +3746,7 @@ discard block |
||
| 3746 | 3746 | { |
| 3747 | 3747 | // phpcs:enable |
| 3748 | 3748 | require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; |
| 3749 | - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib WHERE type = 'ban' AND default_rib = 1 AND fk_soc = ". (int) $this->id; |
|
| 3749 | + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib WHERE type = 'ban' AND default_rib = 1 AND fk_soc = ".(int) $this->id; |
|
| 3750 | 3750 | $resql = $this->db->query($sql); |
| 3751 | 3751 | if (!$resql) { |
| 3752 | 3752 | $this->error = $this->db->lasterror(); |
@@ -4136,7 +4136,7 @@ discard block |
||
| 4136 | 4136 | global $langs; |
| 4137 | 4137 | |
| 4138 | 4138 | if ($company_id > 0) { |
| 4139 | - $sql = "SELECT parent FROM " . MAIN_DB_PREFIX . "societe WHERE rowid = ".((int) $company_id); |
|
| 4139 | + $sql = "SELECT parent FROM ".MAIN_DB_PREFIX."societe WHERE rowid = ".((int) $company_id); |
|
| 4140 | 4140 | $resql = $this->db->query($sql); |
| 4141 | 4141 | if ($resql) { |
| 4142 | 4142 | if ($obj = $this->db->fetch_object($resql)) { |
@@ -4776,7 +4776,7 @@ discard block |
||
| 4776 | 4776 | $country_code = $country_label = ''; |
| 4777 | 4777 | if (getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) { |
| 4778 | 4778 | $tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')); |
| 4779 | - $country_id = (is_numeric($tmp[0])) ? (int) $tmp[0] : 0; |
|
| 4779 | + $country_id = (is_numeric($tmp[0])) ? (int) $tmp[0] : 0; |
|
| 4780 | 4780 | if (!empty($tmp[1])) { // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label" |
| 4781 | 4781 | $country_code = $tmp[1]; |
| 4782 | 4782 | $country_label = $tmp[2]; |
@@ -5663,7 +5663,7 @@ discard block |
||
| 5663 | 5663 | } |
| 5664 | 5664 | $out .= '</span>'; |
| 5665 | 5665 | $out .= '<div class="info-box-content">'; |
| 5666 | - $out .= '<div class="info-box-ref inline-block tdoverflowmax125 valignmiddle">' . $this->getNomUrl(1); |
|
| 5666 | + $out .= '<div class="info-box-ref inline-block tdoverflowmax125 valignmiddle">'.$this->getNomUrl(1); |
|
| 5667 | 5667 | $out .= '</div>'; |
| 5668 | 5668 | if (!empty($this->phone)) { |
| 5669 | 5669 | $out .= '<div class="inline-block valignmiddle">'; |
@@ -5682,8 +5682,8 @@ discard block |
||
| 5682 | 5682 | if (!empty($this->code_client)) { |
| 5683 | 5683 | $out .= '<br><span class="info-box-label opacitymedium">'.$this->code_client.'</span>'; |
| 5684 | 5684 | } |
| 5685 | - $out .= '<br><div class="info-box-status">' . $this->getLibStatut(3) . '</div>'; |
|
| 5686 | - $out .= '</div>'; // end info-box-content |
|
| 5685 | + $out .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>'; |
|
| 5686 | + $out .= '</div>'; // end info-box-content |
|
| 5687 | 5687 | $out .= '</div>'; |
| 5688 | 5688 | $out .= '</div>'; |
| 5689 | 5689 | |
@@ -5786,7 +5786,7 @@ discard block |
||
| 5786 | 5786 | global $conf, $langs, $hookmanager, $user, $action; |
| 5787 | 5787 | |
| 5788 | 5788 | $error = 0; |
| 5789 | - $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
| 5789 | + $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
| 5790 | 5790 | |
| 5791 | 5791 | dol_syslog("mergeCompany merge thirdparty id=".$soc_origin_id." (will be deleted) into the thirdparty id=".$this->id); |
| 5792 | 5792 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | print '</td>'; |
| 42 | 42 | if ($action != 'editsalesrepresentatives' && $user->hasRight('societe', 'creer')) { |
| 43 | 43 | print '<td class="right">'; |
| 44 | - print '<a class="editfielda reposition" href="' . dolBuildUrl($_SERVER["PHP_SELF"], ['action' => 'editsalesrepresentatives', 'socid' => $object->id], true) . '">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>'; |
|
| 44 | + print '<a class="editfielda reposition" href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['action' => 'editsalesrepresentatives', 'socid' => $object->id], true).'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a>'; |
|
| 45 | 45 | print '</td>'; |
| 46 | 46 | } |
| 47 | 47 | print '</tr></table>'; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 62 | 62 | $optioncss = GETPOST('optioncss', 'aZ'); |
| 63 | 63 | $mode = GETPOST('mode', 'alpha'); |
| 64 | -$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 64 | +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 65 | 65 | |
| 66 | 66 | // Search fields |
| 67 | 67 | $search = GETPOST("search", 'alpha'); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $search_address = GETPOST("search_address", 'alpha'); |
| 77 | 77 | $search_zip = GETPOST("search_zip", 'alpha'); |
| 78 | 78 | $search_town = GETPOST("search_town", 'alpha'); |
| 79 | -$search_state = GETPOST("search_state", 'alpha'); // county / departement / federal state |
|
| 79 | +$search_state = GETPOST("search_state", 'alpha'); // county / departement / federal state |
|
| 80 | 80 | $search_country = GETPOST("search_country", 'alpha'); |
| 81 | 81 | $search_phone = GETPOST("search_phone", 'alpha'); |
| 82 | 82 | $search_phone_perso = GETPOST("search_phone_perso", 'alpha'); |
@@ -87,13 +87,13 @@ discard block |
||
| 87 | 87 | $search_morphy = GETPOST("search_morphy", 'alpha'); |
| 88 | 88 | $search_import_key = trim(GETPOST("search_import_key", 'alpha')); |
| 89 | 89 | |
| 90 | -$socid = GETPOSTINT('socid'); |
|
| 90 | +$socid = GETPOSTINT('socid'); |
|
| 91 | 91 | if (GETPOSTINT('catid') && empty($search_categ)) { |
| 92 | 92 | $search_categ = GETPOSTINT('catid'); |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $search_filter = GETPOST("search_filter", 'alpha'); |
| 96 | -$search_status = GETPOST("search_status", 'intcomma'); // status |
|
| 96 | +$search_status = GETPOST("search_status", 'intcomma'); // status |
|
| 97 | 97 | $search_datec_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datec_start_month'), GETPOSTINT('search_datec_start_day'), GETPOSTINT('search_datec_start_year')); |
| 98 | 98 | $search_datec_end = dol_mktime(23, 59, 59, GETPOSTINT('search_datec_end_month'), GETPOSTINT('search_datec_end_day'), GETPOSTINT('search_datec_end_year')); |
| 99 | 99 | $search_datem_start = dol_mktime(0, 0, 0, GETPOSTINT('search_datem_start_month'), GETPOSTINT('search_datem_start_day'), GETPOSTINT('search_datem_start_year')); |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | if ($searchCategoryContactOperator == 0) { |
| 466 | 466 | $searchCategoryContactSqlList[] = " EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX."categorie_member as ck WHERE d.rowid = ck.fk_member AND ck.fk_categorie = ".((int) $searchCategoryContact).")"; |
| 467 | 467 | } else { |
| 468 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryContact); |
|
| 468 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryContact); |
|
| 469 | 469 | } |
| 470 | 470 | } |
| 471 | 471 | } |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | // Output page |
| 633 | 633 | // -------------------------------------------------------------------- |
| 634 | 634 | |
| 635 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-member page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 635 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-member page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 636 | 636 | |
| 637 | 637 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 638 | 638 | |
@@ -850,7 +850,7 @@ discard block |
||
| 850 | 850 | } |
| 851 | 851 | |
| 852 | 852 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 853 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 853 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 854 | 854 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 855 | 855 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 856 | 856 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 1000, 'notnull' => -1,), |
| 109 | 109 | 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => 1, 'visible' => 0, 'position' => 1010), |
| 110 | 110 | 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 1000, 'default' => '0', 'notnull' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '2' => 'InProgress', '3' => 'StatusMOProduced', '9' => 'Canceled')), |
| 111 | - 'fk_parent_line' => array('type' => 'integer:MoLine:mrp/class/mo.class.php', 'label' => 'ParentMo', 'enabled' => 1, 'visible' => 0, 'position' => 1020, 'default' => '0', 'notnull' => 0, 'index' => 1,'showoncombobox' => 0), |
|
| 111 | + 'fk_parent_line' => array('type' => 'integer:MoLine:mrp/class/mo.class.php', 'label' => 'ParentMo', 'enabled' => 1, 'visible' => 0, 'position' => 1020, 'default' => '0', 'notnull' => 0, 'index' => 1, 'showoncombobox' => 0), |
|
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | if (!$error) { |
| 356 | - $result = $this->createProduction($user, $notrigger); // Insert lines from BOM |
|
| 356 | + $result = $this->createProduction($user, $notrigger); // Insert lines from BOM |
|
| 357 | 357 | if ($result <= 0) { |
| 358 | 358 | $error++; |
| 359 | 359 | } |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | $oldQty = $this->oldQty; |
| 879 | 879 | $newQty = $this->qty; |
| 880 | 880 | if ($newQty != $oldQty && !empty($this->oldQty)) { |
| 881 | - $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "mrp_production WHERE fk_mo = " . (int) $this->id; |
|
| 881 | + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."mrp_production WHERE fk_mo = ".(int) $this->id; |
|
| 882 | 882 | $resql = $this->db->query($sql); |
| 883 | 883 | if ($resql) { |
| 884 | 884 | while ($obj = $this->db->fetch_object($resql)) { |
@@ -967,7 +967,7 @@ discard block |
||
| 967 | 967 | } |
| 968 | 968 | $productstatic = new Product($this->db); |
| 969 | 969 | |
| 970 | - $arrayoflines = $this->fetchLinesLinked('consumed', $idline); // Get lines consumed under the one to delete |
|
| 970 | + $arrayoflines = $this->fetchLinesLinked('consumed', $idline); // Get lines consumed under the one to delete |
|
| 971 | 971 | |
| 972 | 972 | $result = 0; |
| 973 | 973 | $error = 0; |
@@ -1071,7 +1071,7 @@ discard block |
||
| 1071 | 1071 | if (getDolGlobalString('MRP_MO_ADDON')) { |
| 1072 | 1072 | $mybool = false; |
| 1073 | 1073 | |
| 1074 | - $file = getDolGlobalString('MRP_MO_ADDON') . ".php"; |
|
| 1074 | + $file = getDolGlobalString('MRP_MO_ADDON').".php"; |
|
| 1075 | 1075 | $classname = getDolGlobalString('MRP_MO_ADDON'); |
| 1076 | 1076 | |
| 1077 | 1077 | // Include file with class |
@@ -1345,8 +1345,8 @@ discard block |
||
| 1345 | 1345 | return 1; |
| 1346 | 1346 | } |
| 1347 | 1347 | |
| 1348 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 1349 | - require_once DOL_DOCUMENT_ROOT . '/product/stock/class/mouvementstock.class.php'; |
|
| 1348 | + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 1349 | + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; |
|
| 1350 | 1350 | $error = 0; |
| 1351 | 1351 | $langs->load('stocks'); |
| 1352 | 1352 | |
@@ -1467,13 +1467,13 @@ discard block |
||
| 1467 | 1467 | $datas['qty'] = '<br><b>'.$langs->trans('QtyToProduce').':</b> '.$this->qty; |
| 1468 | 1468 | } |
| 1469 | 1469 | if (!$nofetch && isset($this->fk_product)) { |
| 1470 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 1470 | + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 1471 | 1471 | $product = new Product($this->db); |
| 1472 | 1472 | $product->fetch($this->fk_product); |
| 1473 | 1473 | $datas['product'] = '<br><b>'.$langs->trans('Product').':</b> '.$product->getNomUrl(1, '', 0, -1, 1); |
| 1474 | 1474 | } |
| 1475 | 1475 | if (!$nofetch && isset($this->fk_warehouse)) { |
| 1476 | - require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; |
|
| 1476 | + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; |
|
| 1477 | 1477 | $warehouse = new Entrepot($this->db); |
| 1478 | 1478 | $warehouse->fetch($this->fk_warehouse); |
| 1479 | 1479 | $datas['warehouse'] = '<br><b>'.$langs->trans('WarehouseForProduction').':</b> '.$warehouse->getNomUrl(1, '', 0, 1); |
@@ -1861,7 +1861,7 @@ discard block |
||
| 1861 | 1861 | $this->tpl['efficiency'] = $line->efficiency; |
| 1862 | 1862 | |
| 1863 | 1863 | |
| 1864 | - global $conf; // used into template |
|
| 1864 | + global $conf; // used into template |
|
| 1865 | 1865 | include DOL_DOCUMENT_ROOT.'/mrp/tpl/originproductline.tpl.php'; |
| 1866 | 1866 | } |
| 1867 | 1867 | |
@@ -2022,14 +2022,14 @@ discard block |
||
| 2022 | 2022 | $now = dol_now(); |
| 2023 | 2023 | |
| 2024 | 2024 | $sql = "SELECT rowid, date_end_planned FROM ".$this->db->prefix()."mrp_mo"; |
| 2025 | - $sql .= " WHERE status IN (" . self::STATUS_VALIDATED . ", " . self::STATUS_INPROGRESS .")"; // 1 = Ouvert, 2 = En cours |
|
| 2025 | + $sql .= " WHERE status IN (".self::STATUS_VALIDATED.", ".self::STATUS_INPROGRESS.")"; // 1 = Ouvert, 2 = En cours |
|
| 2026 | 2026 | $sql .= " AND entity IN (".getEntity('mrp_mo').")"; |
| 2027 | 2027 | |
| 2028 | 2028 | $resql = $this->db->query($sql); |
| 2029 | 2029 | if ($resql) { |
| 2030 | 2030 | $langs->load("mrp"); |
| 2031 | 2031 | $response = new WorkboardResponse(); |
| 2032 | - $warning_delay = $conf->mrp->progress->warning_delay ; |
|
| 2032 | + $warning_delay = $conf->mrp->progress->warning_delay; |
|
| 2033 | 2033 | $response->warning_delay = $warning_delay / 86400; |
| 2034 | 2034 | $response->label = $langs->trans("MOProgress"); |
| 2035 | 2035 | $response->labelShort = $langs->trans("MOProgress"); |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 536 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 536 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 537 | 537 | $selectedfields = (($mode != 'kanban' && $mode != 'kanbangroupby') ? $htmlofselectarray : ''); |
| 538 | 538 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 539 | 539 | |
@@ -813,7 +813,7 @@ discard block |
||
| 813 | 813 | print '<td class="center tdlastresultcode" title="'.dol_escape_htmltag($obj->lastresult).'">'; |
| 814 | 814 | if ($obj->lastresult != '') { |
| 815 | 815 | if (empty($obj->lastresult) || $obj->status == Cronjob::STATUS_DISABLED) { |
| 816 | - print $obj->lastresult; // Print '0' |
|
| 816 | + print $obj->lastresult; // Print '0' |
|
| 817 | 817 | } else { |
| 818 | 818 | print '<span class="error">'.dol_escape_htmltag(dol_trunc($obj->lastresult)).'</div>'; |
| 819 | 819 | } |
@@ -883,7 +883,7 @@ discard block |
||
| 883 | 883 | if ($user->hasRight('cron', 'execute')) { |
| 884 | 884 | if (!empty($obj->status)) { |
| 885 | 885 | print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=execute&token='.newToken(); |
| 886 | - print (!getDolGlobalString('CRON_KEY') ? '' : '&securitykey=' . getDolGlobalString('CRON_KEY')); |
|
| 886 | + print (!getDolGlobalString('CRON_KEY') ? '' : '&securitykey='.getDolGlobalString('CRON_KEY')); |
|
| 887 | 887 | print '&sortfield='.$sortfield; |
| 888 | 888 | print '&sortorder='.$sortorder; |
| 889 | 889 | print $param."\" title=\"".dol_escape_htmltag($langs->trans('CronExecute'))."\">".img_picto($langs->trans('CronExecute'), "play", '', 0, 0, 0, '', 'marginleftonly').'</a>'; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | $this->tab_height = 200; //$this->line_height * $this->line_per_page; |
| 99 | 99 | |
| 100 | 100 | if ($mysoc === null) { |
| 101 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
| 101 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
| 102 | 102 | return; |
| 103 | 103 | } |
| 104 | 104 | // Retrieves issuer |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | // Page footer |
| 212 | 212 | $this->_pagefoot($pdf, null, $outputlangs); |
| 213 | 213 | if (method_exists($pdf, 'AliasNbPages')) { |
| 214 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 214 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | $pdf->Close(); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * Dolibarr version of the loaded document |
| 79 | 79 | * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' |
| 80 | 80 | */ |
| 81 | - public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2. |
|
| 81 | + public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2. |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * @var int height for info total |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $this->watermark = ''; |
| 216 | 216 | |
| 217 | 217 | if ($mysoc === null) { |
| 218 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
| 218 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
| 219 | 219 | return; |
| 220 | 220 | } |
| 221 | 221 | |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | $outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies", "compta")); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | - if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE && !empty($object->situation_cycle_ref)))) { |
|
| 290 | + if (empty($object) || ($object->type != Facture::TYPE_SITUATION && ($object->type != Facture::TYPE_CREDIT_NOTE && !empty($object->situation_cycle_ref)))) { |
|
| 291 | 291 | setEventMessage($langs->trans('WarningsObjectIsNotASituation'), 'warnings'); |
| 292 | 292 | return 1; |
| 293 | 293 | } |
@@ -407,15 +407,15 @@ discard block |
||
| 407 | 407 | $pdf->setAutoPageBreak(true, 0); |
| 408 | 408 | |
| 409 | 409 | // Compute height for total, free text and footer |
| 410 | - $this->heightforinfotot = 50; // Height reserved to output the info and total part and payment part |
|
| 410 | + $this->heightforinfotot = 50; // Height reserved to output the info and total part and payment part |
|
| 411 | 411 | if (!getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS') && $nbpayments > 0) { |
| 412 | 412 | $this->heightforinfotot += (4 * ($nbpayments + 3)); |
| 413 | 413 | } |
| 414 | 414 | if ($nbprevsituation > 0) { |
| 415 | 415 | $this->heightforinfotot += (4 * ($nbprevsituation + 3)); |
| 416 | 416 | } |
| 417 | - $this->heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page |
|
| 418 | - $this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) |
|
| 417 | + $this->heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page |
|
| 418 | + $this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) |
|
| 419 | 419 | |
| 420 | 420 | $heightforqrinvoice = 0; |
| 421 | 421 | if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') { |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | if (!empty($conf->mycompany->multidir_output[$object->entity ?? $conf->entity])) { |
| 438 | 438 | $logodir = $conf->mycompany->multidir_output[$object->entity ?? $conf->entity]; |
| 439 | 439 | } |
| 440 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 440 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 441 | 441 | $this->tplidx = $pdf->importPage(1); |
| 442 | 442 | } |
| 443 | 443 | |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
| 535 | 535 | |
| 536 | 536 | // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
| 537 | - $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
| 537 | + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
| 538 | 538 | $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
| 539 | 539 | |
| 540 | 540 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -1064,14 +1064,14 @@ discard block |
||
| 1064 | 1064 | if (!isset($this->tva[$vatrate])) { |
| 1065 | 1065 | $this->tva[$vatrate] = 0; |
| 1066 | 1066 | } |
| 1067 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
| 1067 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
| 1068 | 1068 | $vatcode = $object->lines[$i]->vat_src_code; |
| 1069 | 1069 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
| 1070 | 1070 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
| 1071 | 1071 | } |
| 1072 | 1072 | if (getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) { |
| 1073 | 1073 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'])) { |
| 1074 | - $this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['tot_ht'] = 0; |
|
| 1074 | + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] = 0; |
|
| 1075 | 1075 | } |
| 1076 | 1076 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne, 'tot_ht' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] + $object->lines[$i]->total_ht); |
| 1077 | 1077 | } else { |
@@ -1169,7 +1169,7 @@ discard block |
||
| 1169 | 1169 | |
| 1170 | 1170 | // Add number of pages in footer |
| 1171 | 1171 | if (method_exists($pdf, 'AliasNbPages')) { |
| 1172 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1172 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1173 | 1173 | } |
| 1174 | 1174 | // Add terms to sale |
| 1175 | 1175 | if (!empty($mysoc->termsofsale) && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) { |
@@ -1430,7 +1430,7 @@ discard block |
||
| 1430 | 1430 | foreach ($this->tva_array as $tvakey => $tvaval) { |
| 1431 | 1431 | $pdf->SetFont('', '', $default_font_size - 2); |
| 1432 | 1432 | $pdf->SetXY($this->marge_gauche, $posy); |
| 1433 | - $titre = round((float) $tvakey, 2) . "%"; |
|
| 1433 | + $titre = round((float) $tvakey, 2)."%"; |
|
| 1434 | 1434 | $pdf->MultiCell(25, 4, $titre, 0, 'L'); |
| 1435 | 1435 | |
| 1436 | 1436 | $pdf->SetFont('', '', $default_font_size - 2); |
@@ -1471,8 +1471,8 @@ discard block |
||
| 1471 | 1471 | $posy = $pdf->GetY() + 4; |
| 1472 | 1472 | } |
| 1473 | 1473 | |
| 1474 | - $posxval = 52; // Position of values of properties shown on left side |
|
| 1475 | - $posxend = 110; // End of x for text on left side |
|
| 1474 | + $posxval = 52; // Position of values of properties shown on left side |
|
| 1475 | + $posxend = 110; // End of x for text on left side |
|
| 1476 | 1476 | if ($this->page_largeur < 210) { // To work with US executive format |
| 1477 | 1477 | $posxend -= 10; |
| 1478 | 1478 | } |
@@ -1481,11 +1481,11 @@ discard block |
||
| 1481 | 1481 | if ($object->status > Facture::STATUS_DRAFT && getDolGlobalInt('PDF_INVOICE_SHOW_BALANCE_SUMMARY')) { |
| 1482 | 1482 | // All customer previous invoices |
| 1483 | 1483 | $sql = "SELECT f.rowid, f.datef, f.total_ttc"; |
| 1484 | - $sql .= " FROM " . MAIN_DB_PREFIX . "facture as f"; |
|
| 1485 | - $sql .= " WHERE f.fk_soc = " . ((int) $object->socid); |
|
| 1486 | - $sql .= " AND f.entity IN (" . getEntity('invoice') . ")"; |
|
| 1487 | - $sql .= " AND f.datef <= '" . $this->db->idate($object->date) . "'"; |
|
| 1488 | - $sql .= " AND f.rowid < " . ((int) $object->id); |
|
| 1484 | + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; |
|
| 1485 | + $sql .= " WHERE f.fk_soc = ".((int) $object->socid); |
|
| 1486 | + $sql .= " AND f.entity IN (".getEntity('invoice').")"; |
|
| 1487 | + $sql .= " AND f.datef <= '".$this->db->idate($object->date)."'"; |
|
| 1488 | + $sql .= " AND f.rowid < ".((int) $object->id); |
|
| 1489 | 1489 | $sql .= " AND f.fk_statut > 0"; |
| 1490 | 1490 | $sql .= " ORDER BY f.datef ASC"; |
| 1491 | 1491 | |
@@ -1502,11 +1502,11 @@ discard block |
||
| 1502 | 1502 | |
| 1503 | 1503 | // All payments before current date |
| 1504 | 1504 | $sql_payments = "SELECT p.datep, pf.fk_facture, pf.amount"; |
| 1505 | - $sql_payments .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf"; |
|
| 1506 | - $sql_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1507 | - $sql_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = pf.fk_facture"; |
|
| 1508 | - $sql_payments .= " WHERE f.fk_soc = " . ((int) $object->socid); |
|
| 1509 | - $sql_payments .= " AND p.datep < '" . $this->db->idate($object->date) . "'"; |
|
| 1505 | + $sql_payments .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf"; |
|
| 1506 | + $sql_payments .= " INNER JOIN ".MAIN_DB_PREFIX."paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1507 | + $sql_payments .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = pf.fk_facture"; |
|
| 1508 | + $sql_payments .= " WHERE f.fk_soc = ".((int) $object->socid); |
|
| 1509 | + $sql_payments .= " AND p.datep < '".$this->db->idate($object->date)."'"; |
|
| 1510 | 1510 | $sql_payments .= " ORDER BY p.datep ASC"; |
| 1511 | 1511 | |
| 1512 | 1512 | $total_payments = 0; |
@@ -1520,11 +1520,11 @@ discard block |
||
| 1520 | 1520 | |
| 1521 | 1521 | // Payments made on current invoice date (including current invoice) |
| 1522 | 1522 | $sql_current_date_payments = "SELECT p.datep, pf.fk_facture, pf.amount"; |
| 1523 | - $sql_current_date_payments .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf"; |
|
| 1524 | - $sql_current_date_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1525 | - $sql_current_date_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = pf.fk_facture"; |
|
| 1526 | - $sql_current_date_payments .= " WHERE f.fk_soc = " . ((int) $object->socid); |
|
| 1527 | - $sql_current_date_payments .= " AND DATE(p.datep) = DATE('" . $this->db->idate($object->date) . "')"; |
|
| 1523 | + $sql_current_date_payments .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf"; |
|
| 1524 | + $sql_current_date_payments .= " INNER JOIN ".MAIN_DB_PREFIX."paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1525 | + $sql_current_date_payments .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = pf.fk_facture"; |
|
| 1526 | + $sql_current_date_payments .= " WHERE f.fk_soc = ".((int) $object->socid); |
|
| 1527 | + $sql_current_date_payments .= " AND DATE(p.datep) = DATE('".$this->db->idate($object->date)."')"; |
|
| 1528 | 1528 | |
| 1529 | 1529 | $current_date_payments = 0; |
| 1530 | 1530 | $resql_current_date = $this->db->query($sql_current_date_payments); |
@@ -1580,7 +1580,7 @@ discard block |
||
| 1580 | 1580 | |
| 1581 | 1581 | $pdf->SetFont('', '', $default_font_size - 2); |
| 1582 | 1582 | $pdf->SetXY($posxval, $posy); |
| 1583 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
| 1583 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
| 1584 | 1584 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
| 1585 | 1585 | |
| 1586 | 1586 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1758,7 +1758,7 @@ discard block |
||
| 1758 | 1758 | include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php'; |
| 1759 | 1759 | $invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type); |
| 1760 | 1760 | |
| 1761 | - $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false); |
|
| 1761 | + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false); |
|
| 1762 | 1762 | } |
| 1763 | 1763 | } |
| 1764 | 1764 | } |
@@ -1935,7 +1935,7 @@ discard block |
||
| 1935 | 1935 | if (($object->lines[$i]->info_bits & 0x01) == 0x01) { |
| 1936 | 1936 | $vatrate .= '*'; |
| 1937 | 1937 | } |
| 1938 | - if (! isset($tvas[$vatrate])) { |
|
| 1938 | + if (!isset($tvas[$vatrate])) { |
|
| 1939 | 1939 | $tvas[$vatrate] = 0; |
| 1940 | 1940 | } |
| 1941 | 1941 | $tvas[$vatrate] += $tvaligne; |
@@ -2219,7 +2219,7 @@ discard block |
||
| 2219 | 2219 | if (empty($hidetop)) { |
| 2220 | 2220 | // Show category of operations |
| 2221 | 2221 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
| 2222 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
| 2222 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
| 2223 | 2223 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
| 2224 | 2224 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
| 2225 | 2225 | } |
@@ -2239,7 +2239,7 @@ discard block |
||
| 2239 | 2239 | $pdf->SetFont('', '', $default_font_size - 1); |
| 2240 | 2240 | |
| 2241 | 2241 | // Output Rect |
| 2242 | - $this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
| 2242 | + $this->printRoundedRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
| 2243 | 2243 | |
| 2244 | 2244 | // situation invoice |
| 2245 | 2245 | $pdf->SetFont('', '', $default_font_size - 2); |
@@ -2279,7 +2279,7 @@ discard block |
||
| 2279 | 2279 | $pdf->SetFont('', '', $default_font_size - 1); |
| 2280 | 2280 | |
| 2281 | 2281 | if (empty($hidetop)) { |
| 2282 | - $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line prend une position y en 2eme param et 4eme param |
|
| 2282 | + $pdf->line($this->marge_gauche, $tab_top + 5, $this->page_largeur - $this->marge_droite, $tab_top + 5); // line prend une position y en 2eme param et 4eme param |
|
| 2283 | 2283 | } |
| 2284 | 2284 | } |
| 2285 | 2285 | |
@@ -2642,7 +2642,7 @@ discard block |
||
| 2642 | 2642 | $idaddressshipping = $object->getIdContact('external', 'SHIPPING'); |
| 2643 | 2643 | |
| 2644 | 2644 | if (!empty($idaddressshipping)) { |
| 2645 | - $object->fetch_contact($idaddressshipping[0]); // Load $object->contact |
|
| 2645 | + $object->fetch_contact($idaddressshipping[0]); // Load $object->contact |
|
| 2646 | 2646 | $companystatic = new Societe($this->db); |
| 2647 | 2647 | $companystatic->fetch($object->contact->fk_soc); |
| 2648 | 2648 | $carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs); |
@@ -2654,7 +2654,7 @@ discard block |
||
| 2654 | 2654 | if (!empty($carac_client_shipping)) { |
| 2655 | 2655 | $posy += $hautcadre; |
| 2656 | 2656 | |
| 2657 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
| 2657 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
| 2658 | 2658 | |
| 2659 | 2659 | // Show shipping frame |
| 2660 | 2660 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -2864,7 +2864,7 @@ discard block |
||
| 2864 | 2864 | 'overtitle' => array( |
| 2865 | 2865 | 'textkey' => 'Chantier', // use lang key is useful in somme case with module |
| 2866 | 2866 | 'align' => 'C', |
| 2867 | - 'padding' => array(0.5,0.5,0.5,0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left |
|
| 2867 | + 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left |
|
| 2868 | 2868 | 'width' => 18 |
| 2869 | 2869 | ), |
| 2870 | 2870 | ); |
@@ -2889,13 +2889,13 @@ discard block |
||
| 2889 | 2889 | ), |
| 2890 | 2890 | 'border-left' => true, // add left line separator |
| 2891 | 2891 | 'overtitle' => array( |
| 2892 | - 'textkey' => 'S'.$derniere_situation->situation_counter . ' - ' . dol_print_date($derniere_situation->date, "%d/%m/%Y"), |
|
| 2892 | + 'textkey' => 'S'.$derniere_situation->situation_counter.' - '.dol_print_date($derniere_situation->date, "%d/%m/%Y"), |
|
| 2893 | 2893 | 'align' => 'C', |
| 2894 | - 'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
| 2894 | + 'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
| 2895 | 2895 | 'width' => 10 + 15 //current width + amount cell width |
| 2896 | 2896 | ), |
| 2897 | 2897 | ); |
| 2898 | - if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) { |
|
| 2898 | + if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) { |
|
| 2899 | 2899 | $this->cols['prev_progress']['status'] = true; |
| 2900 | 2900 | } |
| 2901 | 2901 | |
@@ -2910,7 +2910,7 @@ discard block |
||
| 2910 | 2910 | ), |
| 2911 | 2911 | 'border-left' => true, // add left line separator |
| 2912 | 2912 | ); |
| 2913 | - if ($this->situationinvoice && ! empty($this->TDataSituation['date_derniere_situation'])) { |
|
| 2913 | + if ($this->situationinvoice && !empty($this->TDataSituation['date_derniere_situation'])) { |
|
| 2914 | 2914 | $this->cols['prev_progress_amount']['status'] = true; |
| 2915 | 2915 | } |
| 2916 | 2916 | |
@@ -2925,9 +2925,9 @@ discard block |
||
| 2925 | 2925 | ), |
| 2926 | 2926 | 'border-left' => true, // add left line separator |
| 2927 | 2927 | 'overtitle' => array( |
| 2928 | - 'textkey' => 'S'.$object->situation_counter . ' - ' . dol_print_date($object->date, "%d/%m/%Y"), |
|
| 2928 | + 'textkey' => 'S'.$object->situation_counter.' - '.dol_print_date($object->date, "%d/%m/%Y"), |
|
| 2929 | 2929 | 'align' => 'C', |
| 2930 | - 'padding' => array(0.5,0.2,0.5,0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
| 2930 | + 'padding' => array(0.5, 0.2, 0.5, 0.2), // Like css 0 => top, 1 => right, 2 => bottom, 3 => left |
|
| 2931 | 2931 | 'width' => 10 + 15 |
| 2932 | 2932 | ), |
| 2933 | 2933 | ); |
@@ -3051,7 +3051,7 @@ discard block |
||
| 3051 | 3051 | |
| 3052 | 3052 | // Output Rect |
| 3053 | 3053 | // KEEPTHIS => Affiche les bords extérieurs |
| 3054 | - $this->printRoundedRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
| 3054 | + $this->printRoundedRectBtp($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $this->corner_radius, $hidetop, $hidebottom, 'D'); // Rect prend une longueur en 3eme param et 4eme param |
|
| 3055 | 3055 | |
| 3056 | 3056 | $pdf->line($this->posx_cumul_anterieur - 1, $tab_top, $this->posx_cumul_anterieur - 1, $tab_top + $tab_height); |
| 3057 | 3057 | if (empty($hidetop)) { |
@@ -3108,7 +3108,7 @@ discard block |
||
| 3108 | 3108 | $pdf->SetXY($this->marge_gauche + 10, $tab_top + 24 + $i); |
| 3109 | 3109 | $pdf->MultiCell(80, 2, $outputlangs->transnoentities("TotalHT").' '.$TVatInfo['label'], '', 'L'); |
| 3110 | 3110 | |
| 3111 | - if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
| 3111 | + if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
| 3112 | 3112 | $pdf->SetXY($this->marge_gauche + 10, $tab_top + 28 + $i); |
| 3113 | 3113 | $pdf->MultiCell(80, 2, $outputlangs->transnoentities("VAT").' '.$TVatInfo['label'], '', 'L'); |
| 3114 | 3114 | } else { |
@@ -3172,7 +3172,7 @@ discard block |
||
| 3172 | 3172 | $pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['HT'], 0, '', 1, -1, 2), '', 'R'); |
| 3173 | 3173 | |
| 3174 | 3174 | // Total TVA |
| 3175 | - if (! empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
| 3175 | + if (!empty($this->TDataSituation['current'][$tva_tx_formated]['TVA'])) { |
|
| 3176 | 3176 | $pdf->SetXY($x, $tab_top + 28 + $i); |
| 3177 | 3177 | $pdf->MultiCell(32, 2, price($this->TDataSituation[$col][$tva_tx_formated]['TVA'], 0, '', 1, -1, 2), '', 'R'); |
| 3178 | 3178 | } else { |
@@ -3249,7 +3249,7 @@ discard block |
||
| 3249 | 3249 | |
| 3250 | 3250 | $TDataSituation = array(); |
| 3251 | 3251 | |
| 3252 | - if (! empty($facDerniereSituation)) { |
|
| 3252 | + if (!empty($facDerniereSituation)) { |
|
| 3253 | 3253 | $TDataSituation['derniere_situation'] = $facDerniereSituation; |
| 3254 | 3254 | $TDataSituation['date_derniere_situation'] = $facDerniereSituation->date; |
| 3255 | 3255 | } |
@@ -3258,9 +3258,9 @@ discard block |
||
| 3258 | 3258 | $retenue_garantie_anterieure = 0; |
| 3259 | 3259 | // Init tous les champs à 0 |
| 3260 | 3260 | $TDataSituation['cumul_anterieur'] = array( |
| 3261 | - 'HT' => 0, //montant HT normal |
|
| 3262 | - 'TVA' => 0, //montant de la TVA sur le HTnet |
|
| 3263 | - 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
| 3261 | + 'HT' => 0, //montant HT normal |
|
| 3262 | + 'TVA' => 0, //montant de la TVA sur le HTnet |
|
| 3263 | + 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
| 3264 | 3264 | 'retenue_garantie' => 0, |
| 3265 | 3265 | 'travaux_sup' => 0, |
| 3266 | 3266 | 'HTnet' => 0, //montant HT |
@@ -3290,7 +3290,7 @@ discard block |
||
| 3290 | 3290 | $isFirstSituation = false; |
| 3291 | 3291 | if (!empty($l->fk_prev_id)) { |
| 3292 | 3292 | $prevSituationPercent = $l->get_prev_progress($previousInvoice->id, true); |
| 3293 | - } elseif (! array_key_exists($i + 1, $TPreviousInvoices)) { |
|
| 3293 | + } elseif (!array_key_exists($i + 1, $TPreviousInvoices)) { |
|
| 3294 | 3294 | $isFirstSituation = true; |
| 3295 | 3295 | } |
| 3296 | 3296 | |
@@ -3300,7 +3300,7 @@ discard block |
||
| 3300 | 3300 | |
| 3301 | 3301 | //1ere ligne |
| 3302 | 3302 | $amounttva = $calc_ht * ($ltvatx / 100); |
| 3303 | - if (! isset($TDataSituation['cumul_anterieur'][$ltvatx])) { |
|
| 3303 | + if (!isset($TDataSituation['cumul_anterieur'][$ltvatx])) { |
|
| 3304 | 3304 | $TDataSituation['cumul_anterieur'][$ltvatx]['HT'] = $calc_ht; |
| 3305 | 3305 | $TDataSituation['cumul_anterieur'][$ltvatx]['TVA'] = $amounttva; |
| 3306 | 3306 | } else { |
@@ -3312,14 +3312,14 @@ discard block |
||
| 3312 | 3312 | //le grand total de TVA |
| 3313 | 3313 | // $TDataSituation['cumul_anterieur']['TVA'] += $amounttva; |
| 3314 | 3314 | |
| 3315 | - if (empty($l->fk_prev_id) && ! $isFirstSituation) { |
|
| 3315 | + if (empty($l->fk_prev_id) && !$isFirstSituation) { |
|
| 3316 | 3316 | // TODO: à clarifier, mais pour moi, un facture de situation précédente qui a des progressions à 0% c'est pas logique |
| 3317 | 3317 | $TDataSituation['cumul_anterieur']['travaux_sup'] += $calc_ht; |
| 3318 | 3318 | } |
| 3319 | 3319 | } |
| 3320 | 3320 | } |
| 3321 | 3321 | |
| 3322 | - if (! empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) { |
|
| 3322 | + if (!empty($previousInvoice->retained_warranty) && !getDolGlobalString('USE_RETAINED_WARRANTY_ONLY_FOR_SITUATION_FINAL')) { |
|
| 3323 | 3323 | $retenue_garantie_anterieure += $previousInvoice->getRetainedWarrantyAmount(); |
| 3324 | 3324 | } |
| 3325 | 3325 | |
@@ -3333,7 +3333,7 @@ discard block |
||
| 3333 | 3333 | // print json_encode($facDerniereSituation->lines);exit; |
| 3334 | 3334 | $TDataSituation['current'] = $this->btpGetInvoiceAmounts($object->id); |
| 3335 | 3335 | |
| 3336 | - if (! empty($facDerniereSituation->lines)) { |
|
| 3336 | + if (!empty($facDerniereSituation->lines)) { |
|
| 3337 | 3337 | $TFacLinesKey = array_keys($facDerniereSituation->lines); |
| 3338 | 3338 | $TObjectLinesKey = array_keys($object->lines); |
| 3339 | 3339 | $TDiffKey = array_diff($TObjectLinesKey, $TFacLinesKey); |
@@ -3543,16 +3543,16 @@ discard block |
||
| 3543 | 3543 | $facDerniereSituation = $TPreviousInvoices[0]; |
| 3544 | 3544 | |
| 3545 | 3545 | $ret = array( |
| 3546 | - 'HT' => 0, //montant HT normal |
|
| 3546 | + 'HT' => 0, //montant HT normal |
|
| 3547 | 3547 | 'HTnet' => 0, //montant HT |
| 3548 | - 'TVA' => 0, //montant de la TVA sur le HTnet |
|
| 3549 | - 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
| 3548 | + 'TVA' => 0, //montant de la TVA sur le HTnet |
|
| 3549 | + 'TTC' => 0, //montant TTC (HTnet + TVA) |
|
| 3550 | 3550 | 'retenue_garantie' => 0, |
| 3551 | 3551 | 'travaux_sup' => 0, |
| 3552 | 3552 | 'total_a_payer' => 0 //montant "a payer" sur la facture |
| 3553 | 3553 | ); |
| 3554 | 3554 | |
| 3555 | - if (! empty($facDerniereSituation)) { |
|
| 3555 | + if (!empty($facDerniereSituation)) { |
|
| 3556 | 3556 | $ret['derniere_situation'] = $facDerniereSituation; |
| 3557 | 3557 | $ret['date_derniere_situation'] = $facDerniereSituation->date; |
| 3558 | 3558 | } |
@@ -3692,7 +3692,7 @@ discard block |
||
| 3692 | 3692 | $label = $outputlangs->transnoentities("SituationInvoiceTotalProposal"); |
| 3693 | 3693 | $pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $label, 0, 'L', false, 1, $posx, $posy + 1); |
| 3694 | 3694 | |
| 3695 | - $amount = price($sign * ($total_ht + (! empty($propal->remise) ? $propal->remise : 0))); |
|
| 3695 | + $amount = price($sign * ($total_ht + (!empty($propal->remise) ? $propal->remise : 0))); |
|
| 3696 | 3696 | $pdf->MultiCell($width2, 3, $amount, 0, 'R', false, 1, $posx + $width, $posy + 1); |
| 3697 | 3697 | |
| 3698 | 3698 | $pdf->SetFont('', '', $default_font_size - 1); |
@@ -3736,7 +3736,7 @@ discard block |
||
| 3736 | 3736 | |
| 3737 | 3737 | $force_to_zero = false; |
| 3738 | 3738 | |
| 3739 | - $idinv = 0;//count($previousinvoices); |
|
| 3739 | + $idinv = 0; //count($previousinvoices); |
|
| 3740 | 3740 | while ($idinv < count($previousinvoices)) { |
| 3741 | 3741 | $invoice = $previousinvoices[$idinv]; |
| 3742 | 3742 | |
@@ -3758,7 +3758,7 @@ discard block |
||
| 3758 | 3758 | $force_to_zero = true; |
| 3759 | 3759 | } |
| 3760 | 3760 | |
| 3761 | - $ref .= ' - '. $invoice->ref; |
|
| 3761 | + $ref .= ' - '.$invoice->ref; |
|
| 3762 | 3762 | $ref .= ' ('.dol_print_date($invoice->date, "%d/%m/%Y", false, $outputlangs).')'; |
| 3763 | 3763 | $pdf->MultiCell($this->page_largeur - ($this->marge_droite + $this->marge_gauche), 3, $ref, 0, 'L', false); |
| 3764 | 3764 | |
@@ -3789,7 +3789,7 @@ discard block |
||
| 3789 | 3789 | if (($invoice->lines[$i]->info_bits & 0x01) == 0x01) { |
| 3790 | 3790 | $vatrate .= '*'; |
| 3791 | 3791 | } |
| 3792 | - if (! isset($tvas[$vatrate])) { |
|
| 3792 | + if (!isset($tvas[$vatrate])) { |
|
| 3793 | 3793 | $tvas[$vatrate] = 0; |
| 3794 | 3794 | } |
| 3795 | 3795 | $tvas[$vatrate] += $tvaligne; |
@@ -3967,7 +3967,7 @@ discard block |
||
| 3967 | 3967 | $pdf->SetXY($posx + $width4, $posy + $height * $index + $y); |
| 3968 | 3968 | $pdf->MultiCell($width4, $height - 1, price($sign * $payment['amount'], 0, $outputlangs), 0, 'L', false); |
| 3969 | 3969 | $pdf->SetXY($posx + $width4 * 2, $posy + $height * $index + $y); |
| 3970 | - $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $payment['type']); |
|
| 3970 | + $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort".$payment['type']); |
|
| 3971 | 3971 | |
| 3972 | 3972 | $pdf->MultiCell($width4, $height - 1, $oper, 0, 'L', false); |
| 3973 | 3973 | $pdf->SetXY($posx + $width4 * 3, $posy + $height * $index + $y); |
@@ -3998,7 +3998,7 @@ discard block |
||
| 3998 | 3998 | $this->_pagehead($pdf, $object, 0, $outputlangs); |
| 3999 | 3999 | } |
| 4000 | 4000 | $pdf->setPage($pageposafter + 1); |
| 4001 | - $pdf->setPageOrientation('', true, 0); // The only function to edit the bottom margin of current page to set it. |
|
| 4001 | + $pdf->setPageOrientation('', true, 0); // The only function to edit the bottom margin of current page to set it. |
|
| 4002 | 4002 | |
| 4003 | 4003 | $posy = $this->tab_top_newpage + 1; |
| 4004 | 4004 | } else { |
@@ -4030,7 +4030,7 @@ discard block |
||
| 4030 | 4030 | |
| 4031 | 4031 | $posy += 10; |
| 4032 | 4032 | |
| 4033 | - $pdf->setPageOrientation('', true, 0); // The only function to edit the bottom margin of current page to set it. |
|
| 4033 | + $pdf->setPageOrientation('', true, 0); // The only function to edit the bottom margin of current page to set it. |
|
| 4034 | 4034 | |
| 4035 | 4035 | // If invoice was linked to propals or orders |
| 4036 | 4036 | // TODO This part is bugged because the same proposals may be split in different invoices also several proposals may have been merged into the same invoice, |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $this->watermark = ''; |
| 161 | 161 | |
| 162 | 162 | if ($mysoc === null) { |
| 163 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
| 163 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
| 164 | 164 | return; |
| 165 | 165 | } |
| 166 | 166 | |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | if (!getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS') && $nbpayments > 0) { |
| 346 | 346 | $this->heightforinfotot += (4 * $nbpayments); |
| 347 | 347 | } |
| 348 | - $this->heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page |
|
| 348 | + $this->heightforfreetext = getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT', 5); // Height reserved to output the free text on last page |
|
| 349 | 349 | $this->heightforfooter = $this->marge_basse + (!getDolGlobalString('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS') ? 12 : 22); // Height reserved to output the footer (value include bottom margin) |
| 350 | 350 | |
| 351 | 351 | $heightforqrinvoice = 0; |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | if (!empty($conf->mycompany->multidir_output[$object->entity ?? $conf->entity])) { |
| 369 | 369 | $logodir = $conf->mycompany->multidir_output[$object->entity ?? $conf->entity]; |
| 370 | 370 | } |
| 371 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 371 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 372 | 372 | $tplidx = $pdf->importPage(1); |
| 373 | 373 | } |
| 374 | 374 | |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | // $pdf->GetY() here can't be used. It is bottom of the second address box but first one may be higher |
| 466 | 466 | |
| 467 | 467 | // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
| 468 | - $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
| 468 | + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
| 469 | 469 | $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
| 470 | 470 | |
| 471 | 471 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -899,7 +899,7 @@ discard block |
||
| 899 | 899 | $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey, $outputlangs); |
| 900 | 900 | $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); |
| 901 | 901 | |
| 902 | - $this->setAfterColsLinePositionsData('options_' . $extrafieldColKey, $pdf->GetY(), $pdf->getPage()); |
|
| 902 | + $this->setAfterColsLinePositionsData('options_'.$extrafieldColKey, $pdf->GetY(), $pdf->getPage()); |
|
| 903 | 903 | } |
| 904 | 904 | } |
| 905 | 905 | } |
@@ -978,14 +978,14 @@ discard block |
||
| 978 | 978 | if (!isset($this->tva[$vatrate])) { |
| 979 | 979 | $this->tva[$vatrate] = 0; |
| 980 | 980 | } |
| 981 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
| 981 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandoned, we use now ->tva_array that is more complete |
|
| 982 | 982 | $vatcode = $object->lines[$i]->vat_src_code; |
| 983 | 983 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
| 984 | 984 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
| 985 | 985 | } |
| 986 | 986 | if (getDolGlobalInt('PDF_INVOICE_SHOW_VAT_ANALYSIS')) { |
| 987 | 987 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'])) { |
| 988 | - $this->tva_array[$vatrate . ($vatcode ? ' (' . $vatcode . ')' : '')]['tot_ht'] = 0; |
|
| 988 | + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] = 0; |
|
| 989 | 989 | } |
| 990 | 990 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne, 'tot_ht' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['tot_ht'] + $object->lines[$i]->total_ht); |
| 991 | 991 | } else { |
@@ -1092,7 +1092,7 @@ discard block |
||
| 1092 | 1092 | |
| 1093 | 1093 | // Add number of pages in footer |
| 1094 | 1094 | if (method_exists($pdf, 'AliasNbPages')) { |
| 1095 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1095 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 1096 | 1096 | } |
| 1097 | 1097 | // Add terms to sale |
| 1098 | 1098 | if (!empty($mysoc->termsofsale) && getDolGlobalInt('MAIN_PDF_ADD_TERMSOFSALE_INVOICE')) { |
@@ -1349,7 +1349,7 @@ discard block |
||
| 1349 | 1349 | foreach ($this->tva_array as $tvakey => $tvaval) { |
| 1350 | 1350 | $pdf->SetFont('', '', $default_font_size - 2); |
| 1351 | 1351 | $pdf->SetXY($this->marge_gauche, $posy); |
| 1352 | - $titre = round((float) $tvakey, 2) . "%"; |
|
| 1352 | + $titre = round((float) $tvakey, 2)."%"; |
|
| 1353 | 1353 | $pdf->MultiCell(25, 4, $titre, 0, 'L'); |
| 1354 | 1354 | |
| 1355 | 1355 | $pdf->SetFont('', '', $default_font_size - 2); |
@@ -1390,8 +1390,8 @@ discard block |
||
| 1390 | 1390 | $posy = $pdf->GetY() + 4; |
| 1391 | 1391 | } |
| 1392 | 1392 | |
| 1393 | - $posxval = 52; // Position of values of properties shown on left side |
|
| 1394 | - $posxend = 110; // End of x for text on left side |
|
| 1393 | + $posxval = 52; // Position of values of properties shown on left side |
|
| 1394 | + $posxend = 110; // End of x for text on left side |
|
| 1395 | 1395 | if ($this->page_largeur < 210) { // To work with US executive format |
| 1396 | 1396 | $posxend -= 10; |
| 1397 | 1397 | } |
@@ -1400,11 +1400,11 @@ discard block |
||
| 1400 | 1400 | if ($object->status > Facture::STATUS_DRAFT && getDolGlobalInt('PDF_INVOICE_SHOW_BALANCE_SUMMARY')) { |
| 1401 | 1401 | // All customer previous invoices |
| 1402 | 1402 | $sql = "SELECT f.rowid, f.datef, f.total_ttc"; |
| 1403 | - $sql .= " FROM " . MAIN_DB_PREFIX . "facture as f"; |
|
| 1404 | - $sql .= " WHERE f.fk_soc = " . ((int) $object->socid); |
|
| 1405 | - $sql .= " AND f.entity IN (" . getEntity('invoice') . ")"; |
|
| 1406 | - $sql .= " AND f.datef <= '" . $this->db->idate($object->date) . "'"; |
|
| 1407 | - $sql .= " AND f.rowid < " . ((int) $object->id); |
|
| 1403 | + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; |
|
| 1404 | + $sql .= " WHERE f.fk_soc = ".((int) $object->socid); |
|
| 1405 | + $sql .= " AND f.entity IN (".getEntity('invoice').")"; |
|
| 1406 | + $sql .= " AND f.datef <= '".$this->db->idate($object->date)."'"; |
|
| 1407 | + $sql .= " AND f.rowid < ".((int) $object->id); |
|
| 1408 | 1408 | $sql .= " AND f.fk_statut > 0"; |
| 1409 | 1409 | $sql .= " ORDER BY f.datef ASC"; |
| 1410 | 1410 | |
@@ -1421,11 +1421,11 @@ discard block |
||
| 1421 | 1421 | |
| 1422 | 1422 | // All payments before current date |
| 1423 | 1423 | $sql_payments = "SELECT p.datep, pf.fk_facture, pf.amount"; |
| 1424 | - $sql_payments .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf"; |
|
| 1425 | - $sql_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1426 | - $sql_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = pf.fk_facture"; |
|
| 1427 | - $sql_payments .= " WHERE f.fk_soc = " . ((int) $object->socid); |
|
| 1428 | - $sql_payments .= " AND p.datep < '" . $this->db->idate($object->date) . "'"; |
|
| 1424 | + $sql_payments .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf"; |
|
| 1425 | + $sql_payments .= " INNER JOIN ".MAIN_DB_PREFIX."paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1426 | + $sql_payments .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = pf.fk_facture"; |
|
| 1427 | + $sql_payments .= " WHERE f.fk_soc = ".((int) $object->socid); |
|
| 1428 | + $sql_payments .= " AND p.datep < '".$this->db->idate($object->date)."'"; |
|
| 1429 | 1429 | $sql_payments .= " ORDER BY p.datep ASC"; |
| 1430 | 1430 | |
| 1431 | 1431 | $total_payments = 0; |
@@ -1439,11 +1439,11 @@ discard block |
||
| 1439 | 1439 | |
| 1440 | 1440 | // Payments made on current invoice date (including current invoice) |
| 1441 | 1441 | $sql_current_date_payments = "SELECT p.datep, pf.fk_facture, pf.amount"; |
| 1442 | - $sql_current_date_payments .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf"; |
|
| 1443 | - $sql_current_date_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1444 | - $sql_current_date_payments .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = pf.fk_facture"; |
|
| 1445 | - $sql_current_date_payments .= " WHERE f.fk_soc = " . ((int) $object->socid); |
|
| 1446 | - $sql_current_date_payments .= " AND DATE(p.datep) = DATE('" . $this->db->idate($object->date) . "')"; |
|
| 1442 | + $sql_current_date_payments .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf"; |
|
| 1443 | + $sql_current_date_payments .= " INNER JOIN ".MAIN_DB_PREFIX."paiement as p ON p.rowid = pf.fk_paiement"; |
|
| 1444 | + $sql_current_date_payments .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = pf.fk_facture"; |
|
| 1445 | + $sql_current_date_payments .= " WHERE f.fk_soc = ".((int) $object->socid); |
|
| 1446 | + $sql_current_date_payments .= " AND DATE(p.datep) = DATE('".$this->db->idate($object->date)."')"; |
|
| 1447 | 1447 | |
| 1448 | 1448 | $current_date_payments = 0; |
| 1449 | 1449 | $resql_current_date = $this->db->query($sql_current_date_payments); |
@@ -1499,7 +1499,7 @@ discard block |
||
| 1499 | 1499 | |
| 1500 | 1500 | $pdf->SetFont('', '', $default_font_size - 2); |
| 1501 | 1501 | $pdf->SetXY($posxval, $posy); |
| 1502 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
| 1502 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
| 1503 | 1503 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
| 1504 | 1504 | |
| 1505 | 1505 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1677,7 +1677,7 @@ discard block |
||
| 1677 | 1677 | include_once DOL_DOCUMENT_ROOT.'/core/lib/functions_be.lib.php'; |
| 1678 | 1678 | $invoicePaymentKey = dolBECalculateStructuredCommunication($object->ref, $object->type); |
| 1679 | 1679 | |
| 1680 | - $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": " . $outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false); |
|
| 1680 | + $pdf->MultiCell(100, 3, $outputlangs->transnoentities('StructuredCommunication').": ".$outputlangs->convToOutputCharset($invoicePaymentKey), 0, 'L', false); |
|
| 1681 | 1681 | } |
| 1682 | 1682 | } |
| 1683 | 1683 | } |
@@ -2368,7 +2368,7 @@ discard block |
||
| 2368 | 2368 | if (empty($hidetop)) { |
| 2369 | 2369 | // Show category of operations |
| 2370 | 2370 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
| 2371 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
| 2371 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
| 2372 | 2372 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
| 2373 | 2373 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
| 2374 | 2374 | } |
@@ -2485,7 +2485,7 @@ discard block |
||
| 2485 | 2485 | } |
| 2486 | 2486 | if ($this->situationinvoice) { |
| 2487 | 2487 | $outputlangs->loadLangs(array("other")); |
| 2488 | - $title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -"; |
|
| 2488 | + $title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -"; |
|
| 2489 | 2489 | $subtitle = $outputlangs->transnoentities("PDFSituationTitle", (string) $object->situation_counter); |
| 2490 | 2490 | } |
| 2491 | 2491 | if (getDolGlobalString('PDF_USE_ALSO_LANGUAGE_CODE') && is_object($outputlangsbis)) { |
@@ -2770,7 +2770,7 @@ discard block |
||
| 2770 | 2770 | $idaddressshipping = $object->getIdContact('external', 'SHIPPING'); |
| 2771 | 2771 | |
| 2772 | 2772 | if (!empty($idaddressshipping)) { |
| 2773 | - $object->fetch_contact($idaddressshipping[0]); // Load $object->contact |
|
| 2773 | + $object->fetch_contact($idaddressshipping[0]); // Load $object->contact |
|
| 2774 | 2774 | $companystatic = new Societe($this->db); |
| 2775 | 2775 | $companystatic->fetch($object->contact->fk_soc); |
| 2776 | 2776 | $carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs); |
@@ -2782,7 +2782,7 @@ discard block |
||
| 2782 | 2782 | if (!empty($carac_client_shipping)) { |
| 2783 | 2783 | $posy += $hautcadre; |
| 2784 | 2784 | |
| 2785 | - $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
| 2785 | + $hautcadre -= 10; // Height for the shipping address does not need to be as high as main box |
|
| 2786 | 2786 | |
| 2787 | 2787 | // Show shipping frame |
| 2788 | 2788 | $pdf->SetXY($posx + 2, $posy - 5); |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | 'td' => 'class="right" width="18"', |
| 141 | 141 | 'text' => $memberstatic->LibStatut($data['status'], $data['need_subscription'], $data['date_end_subscription'], 3), |
| 142 | 142 | ); |
| 143 | - $line ++; |
|
| 143 | + $line++; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | if ($num == 0) { |