@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | // Object card |
145 | 145 | // ------------------------------------------------------------ |
146 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
146 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
147 | 147 | |
148 | 148 | $morehtmlref = '<div class="refidno">'; |
149 | 149 | $morehtmlref .= '</div>'; |
@@ -167,16 +167,16 @@ discard block |
||
167 | 167 | $objthirdparty = $object; |
168 | 168 | $objcon = new stdClass(); |
169 | 169 | |
170 | - $out = '&origin=' . urlencode((string) ($object->element . '@' . $object->module)) . '&originid=' . urlencode((string) ($object->id)); |
|
171 | - $urlbacktopage = $_SERVER['PHP_SELF'] . '?id=' . $object->id; |
|
172 | - $out .= '&backtopage=' . urlencode($urlbacktopage); |
|
170 | + $out = '&origin='.urlencode((string) ($object->element.'@'.$object->module)).'&originid='.urlencode((string) ($object->id)); |
|
171 | + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; |
|
172 | + $out .= '&backtopage='.urlencode($urlbacktopage); |
|
173 | 173 | $permok = $user->hasRight('agenda', 'myactions', 'create'); |
174 | 174 | if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { |
175 | 175 | //$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; |
176 | 176 | if (get_class($objthirdparty) == 'Societe') { |
177 | - $out .= '&socid=' . urlencode((string) ($objthirdparty->id)); |
|
177 | + $out .= '&socid='.urlencode((string) ($objthirdparty->id)); |
|
178 | 178 | } |
179 | - $out .= (!empty($objcon->id) ? '&contactid=' . urlencode($objcon->id) : ''); |
|
179 | + $out .= (!empty($objcon->id) ? '&contactid='.urlencode($objcon->id) : ''); |
|
180 | 180 | //$out.=$langs->trans("AddAnAction").' '; |
181 | 181 | //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); |
182 | 182 | //$out.="</a>"; |
@@ -187,18 +187,18 @@ discard block |
||
187 | 187 | |
188 | 188 | if (isModEnabled('agenda')) { |
189 | 189 | if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) { |
190 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/comm/action/card.php?action=create' . $out . '">' . $langs->trans("AddAction") . '</a>'; |
|
190 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'.$out.'">'.$langs->trans("AddAction").'</a>'; |
|
191 | 191 | } else { |
192 | - print '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("AddAction") . '</a>'; |
|
192 | + print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AddAction").'</a>'; |
|
193 | 193 | } |
194 | 194 | } |
195 | 195 | |
196 | 196 | print '</div>'; |
197 | 197 | |
198 | 198 | if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { |
199 | - $param = '&id=' . $object->id . '&socid=' . $socid; |
|
199 | + $param = '&id='.$object->id.'&socid='.$socid; |
|
200 | 200 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
201 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
201 | + $param .= '&contextpage='.urlencode($contextpage); |
|
202 | 202 | } |
203 | 203 | if ($limit > 0 && $limit != $conf->liste_limit) { |
204 | 204 | $param .= '&limit='.((int) $limit); |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | |
25 | 25 | // Load Dolibarr environment |
26 | 26 | require '../../main.inc.php'; |
27 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php'; |
|
28 | -require_once DOL_DOCUMENT_ROOT . '/asset/class/assetmodel.class.php'; |
|
29 | -require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; |
|
30 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
31 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
27 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; |
|
28 | +require_once DOL_DOCUMENT_ROOT.'/asset/class/assetmodel.class.php'; |
|
29 | +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; |
|
30 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
31 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
32 | 32 | |
33 | 33 | // Load translation files required by the page |
34 | 34 | $langs->loadLangs(array("assets", "other")); |
@@ -71,15 +71,15 @@ discard block |
||
71 | 71 | // Initialize technical objects |
72 | 72 | $object = new AssetModel($db); |
73 | 73 | $extrafields = new ExtraFields($db); |
74 | -$diroutputmassaction = $conf->asset->dir_output . '/temp/massgeneration/' . $user->id; |
|
74 | +$diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id; |
|
75 | 75 | $hookmanager->initHooks(array('assetmodelagenda', 'globalcard')); // Note that conf->hooks_modules contains array |
76 | 76 | // Fetch optionals attributes and labels |
77 | 77 | $extrafields->fetch_name_optionals_label($object->table_element); |
78 | 78 | |
79 | 79 | // Load object |
80 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
80 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
81 | 81 | if ($id > 0 || !empty($ref)) { |
82 | - $upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1] . "/model/" . $object->id; |
|
82 | + $upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1]."/model/".$object->id; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | $permissiontoread = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('asset', 'read')) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('asset', 'model_advance', 'read'))); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if (empty($reshook)) { |
116 | 116 | // Cancel |
117 | 117 | if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { |
118 | - header("Location: " . $backtopage); |
|
118 | + header("Location: ".$backtopage); |
|
119 | 119 | exit; |
120 | 120 | } |
121 | 121 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | // Object card |
151 | 151 | // ------------------------------------------------------------ |
152 | - $linkback = '<a href="' . DOL_URL_ROOT . '/asset/model/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
152 | + $linkback = '<a href="'.DOL_URL_ROOT.'/asset/model/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
153 | 153 | |
154 | 154 | $morehtmlref = '<div class="refidno">'; |
155 | 155 | $morehtmlref .= '</div>'; |
@@ -173,16 +173,16 @@ discard block |
||
173 | 173 | $objthirdparty = $object; |
174 | 174 | $objcon = new stdClass(); |
175 | 175 | |
176 | - $out = '&origin=' . urlencode((string) ($object->element . '@' . $object->module)) . '&originid=' . urlencode((string) ($object->id)); |
|
177 | - $urlbacktopage = $_SERVER['PHP_SELF'] . '?id=' . $object->id; |
|
178 | - $out .= '&backtopage=' . urlencode($urlbacktopage); |
|
176 | + $out = '&origin='.urlencode((string) ($object->element.'@'.$object->module)).'&originid='.urlencode((string) ($object->id)); |
|
177 | + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; |
|
178 | + $out .= '&backtopage='.urlencode($urlbacktopage); |
|
179 | 179 | $permok = $user->hasRight('agenda', 'myactions', 'create'); |
180 | 180 | if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { |
181 | 181 | //$out.='<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create'; |
182 | 182 | if (get_class($objthirdparty) == 'Societe') { |
183 | - $out .= '&socid=' . urlencode((string) ($objthirdparty->id)); |
|
183 | + $out .= '&socid='.urlencode((string) ($objthirdparty->id)); |
|
184 | 184 | } |
185 | - $out .= (!empty($objcon->id) ? '&contactid=' . urlencode($objcon->id) : ''); |
|
185 | + $out .= (!empty($objcon->id) ? '&contactid='.urlencode($objcon->id) : ''); |
|
186 | 186 | //$out.=$langs->trans("AddAnAction").' '; |
187 | 187 | //$out.=img_picto($langs->trans("AddAnAction"),'filenew'); |
188 | 188 | //$out.="</a>"; |
@@ -584,7 +584,7 @@ |
||
584 | 584 | |
585 | 585 | // Link to source object |
586 | 586 | print '<td class="tdoverflowmax150"'.(preg_match('/<a/', $object_link) ? '' : 'title="'.dol_escape_htmltag(dol_string_nohtmltag($object_link.' - '.$object_link_title)).'"').'>'; |
587 | - print '<!-- object_link -->'; // $object_link can be a '<a href' link or a text |
|
587 | + print '<!-- object_link -->'; // $object_link can be a '<a href' link or a text |
|
588 | 588 | print $object_link; |
589 | 589 | print '</td>'; |
590 | 590 |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | /** |
214 | 214 | * @var int Thirdparty ID |
215 | 215 | */ |
216 | - public $socid; // both socid and fk_soc are used |
|
217 | - public $fk_soc; // both socid and fk_soc are used |
|
216 | + public $socid; // both socid and fk_soc are used |
|
217 | + public $fk_soc; // both socid and fk_soc are used |
|
218 | 218 | |
219 | 219 | /** |
220 | 220 | * @var string Thirdparty name |
@@ -769,11 +769,11 @@ discard block |
||
769 | 769 | global $conf; |
770 | 770 | $dn = ''; |
771 | 771 | if ($mode == 0) { |
772 | - $dn = getDolGlobalString('LDAP_KEY_CONTACTS') . "=".$info[getDolGlobalString('LDAP_KEY_CONTACTS')]."," . getDolGlobalString('LDAP_CONTACT_DN'); |
|
772 | + $dn = getDolGlobalString('LDAP_KEY_CONTACTS')."=".$info[getDolGlobalString('LDAP_KEY_CONTACTS')].",".getDolGlobalString('LDAP_CONTACT_DN'); |
|
773 | 773 | } elseif ($mode == 1) { |
774 | 774 | $dn = getDolGlobalString('LDAP_CONTACT_DN'); |
775 | 775 | } elseif ($mode == 2) { |
776 | - $dn = getDolGlobalString('LDAP_KEY_CONTACTS') . "=".$info[getDolGlobalString('LDAP_KEY_CONTACTS')]; |
|
776 | + $dn = getDolGlobalString('LDAP_KEY_CONTACTS')."=".$info[getDolGlobalString('LDAP_KEY_CONTACTS')]; |
|
777 | 777 | } |
778 | 778 | return $dn; |
779 | 779 | } |
@@ -926,12 +926,12 @@ discard block |
||
926 | 926 | // Update birthday alert |
927 | 927 | if (!empty($this->birthday_alert)) { |
928 | 928 | //check existing |
929 | - $sql_check = "SELECT rowid FROM " . MAIN_DB_PREFIX . "user_alert WHERE type = 1 AND fk_contact = " . ((int) $id) . " AND fk_user = " . ((int) $user->id); |
|
929 | + $sql_check = "SELECT rowid FROM ".MAIN_DB_PREFIX."user_alert WHERE type = 1 AND fk_contact = ".((int) $id)." AND fk_user = ".((int) $user->id); |
|
930 | 930 | $result_check = $this->db->query($sql_check); |
931 | 931 | if (!$result_check || ($this->db->num_rows($result_check) < 1)) { |
932 | 932 | //insert |
933 | - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "user_alert(type, fk_contact, fk_user) "; |
|
934 | - $sql .= "VALUES (1," . ((int) $id) . "," . ((int) $user->id) . ")"; |
|
933 | + $sql = "INSERT INTO ".MAIN_DB_PREFIX."user_alert(type, fk_contact, fk_user) "; |
|
934 | + $sql .= "VALUES (1,".((int) $id).",".((int) $user->id).")"; |
|
935 | 935 | $result = $this->db->query($sql); |
936 | 936 | if (!$result) { |
937 | 937 | $error++; |
@@ -941,8 +941,8 @@ discard block |
||
941 | 941 | $result = true; |
942 | 942 | } |
943 | 943 | } else { |
944 | - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "user_alert "; |
|
945 | - $sql .= "WHERE type=1 AND fk_contact=" . ((int) $id) . " AND fk_user=" . ((int) $user->id); |
|
944 | + $sql = "DELETE FROM ".MAIN_DB_PREFIX."user_alert "; |
|
945 | + $sql .= "WHERE type=1 AND fk_contact=".((int) $id)." AND fk_user=".((int) $user->id); |
|
946 | 946 | $result = $this->db->query($sql); |
947 | 947 | if (!$result) { |
948 | 948 | $error++; |
@@ -1039,37 +1039,37 @@ discard block |
||
1039 | 1039 | } elseif ($num) { // $num = 1 |
1040 | 1040 | $obj = $this->db->fetch_object($resql); |
1041 | 1041 | |
1042 | - $this->id = $obj->rowid; |
|
1043 | - $this->entity = $obj->entity; |
|
1044 | - $this->ref = $obj->rowid; |
|
1045 | - $this->ref_ext = $obj->ref_ext; |
|
1042 | + $this->id = $obj->rowid; |
|
1043 | + $this->entity = $obj->entity; |
|
1044 | + $this->ref = $obj->rowid; |
|
1045 | + $this->ref_ext = $obj->ref_ext; |
|
1046 | 1046 | |
1047 | 1047 | $this->civility_code = $obj->civility_code; |
1048 | 1048 | $this->civility = $obj->civility_code ? ($langs->trans("Civility".$obj->civility_code) != "Civility".$obj->civility_code ? $langs->trans("Civility".$obj->civility_code) : $obj->civility_code) : ''; |
1049 | 1049 | |
1050 | - $this->name_alias = $obj->name_alias; |
|
1050 | + $this->name_alias = $obj->name_alias; |
|
1051 | 1051 | $this->lastname = $obj->lastname; |
1052 | 1052 | $this->firstname = $obj->firstname; |
1053 | - $this->address = $obj->address; |
|
1054 | - $this->zip = $obj->zip; |
|
1055 | - $this->town = $obj->town; |
|
1053 | + $this->address = $obj->address; |
|
1054 | + $this->zip = $obj->zip; |
|
1055 | + $this->town = $obj->town; |
|
1056 | 1056 | |
1057 | 1057 | $this->date_creation = $this->db->jdate($obj->date_creation); |
1058 | 1058 | $this->date_modification = $this->db->jdate($obj->date_modification); |
1059 | 1059 | |
1060 | - $this->state_id = $obj->state_id; |
|
1060 | + $this->state_id = $obj->state_id; |
|
1061 | 1061 | $this->state_code = $obj->state_code; |
1062 | - $this->state = $obj->state; |
|
1062 | + $this->state = $obj->state; |
|
1063 | 1063 | |
1064 | 1064 | $this->country_id = $obj->country_id; |
1065 | - $this->country_code = $obj->country_id ? $obj->country_code : ''; |
|
1066 | - $this->country = $obj->country_id ? ($langs->trans('Country'.$obj->country_code) != 'Country'.$obj->country_code ? $langs->transnoentities('Country'.$obj->country_code) : $obj->country) : ''; |
|
1065 | + $this->country_code = $obj->country_id ? $obj->country_code : ''; |
|
1066 | + $this->country = $obj->country_id ? ($langs->trans('Country'.$obj->country_code) != 'Country'.$obj->country_code ? $langs->transnoentities('Country'.$obj->country_code) : $obj->country) : ''; |
|
1067 | 1067 | |
1068 | - $this->fk_soc = $obj->fk_soc; // Both fk_soc and socid are used |
|
1069 | - $this->socid = $obj->fk_soc; // Both fk_soc and socid are used |
|
1070 | - $this->socname = $obj->socname; |
|
1068 | + $this->fk_soc = $obj->fk_soc; // Both fk_soc and socid are used |
|
1069 | + $this->socid = $obj->fk_soc; // Both fk_soc and socid are used |
|
1070 | + $this->socname = $obj->socname; |
|
1071 | 1071 | $this->poste = $obj->poste; |
1072 | - $this->statut = $obj->statut; |
|
1072 | + $this->statut = $obj->statut; |
|
1073 | 1073 | |
1074 | 1074 | $this->fk_prospectlevel = $obj->fk_prospectlevel; |
1075 | 1075 | |
@@ -1079,25 +1079,25 @@ discard block |
||
1079 | 1079 | $this->statut_commercial = $libelle; // libelle statut commercial |
1080 | 1080 | $this->stcomm_picto = $obj->stcomm_picto; // Picto statut commercial |
1081 | 1081 | |
1082 | - $this->phone_pro = trim($obj->phone); |
|
1083 | - $this->fax = trim($obj->fax); |
|
1084 | - $this->phone_perso = trim($obj->phone_perso); |
|
1085 | - $this->phone_mobile = trim($obj->phone_mobile); |
|
1082 | + $this->phone_pro = trim($obj->phone); |
|
1083 | + $this->fax = trim($obj->fax); |
|
1084 | + $this->phone_perso = trim($obj->phone_perso); |
|
1085 | + $this->phone_mobile = trim($obj->phone_mobile); |
|
1086 | 1086 | |
1087 | 1087 | $this->email = $obj->email; |
1088 | - $this->socialnetworks = ($obj->socialnetworks ? (array) json_decode($obj->socialnetworks, true) : array()); |
|
1088 | + $this->socialnetworks = ($obj->socialnetworks ? (array) json_decode($obj->socialnetworks, true) : array()); |
|
1089 | 1089 | $this->photo = $obj->photo; |
1090 | 1090 | $this->priv = $obj->priv; |
1091 | 1091 | $this->mail = $obj->email; |
1092 | 1092 | |
1093 | - $this->birthday = $this->db->jdate($obj->birthday); |
|
1094 | - $this->note = $obj->note_private; // deprecated |
|
1093 | + $this->birthday = $this->db->jdate($obj->birthday); |
|
1094 | + $this->note = $obj->note_private; // deprecated |
|
1095 | 1095 | $this->note_private = $obj->note_private; |
1096 | - $this->note_public = $obj->note_public; |
|
1096 | + $this->note_public = $obj->note_public; |
|
1097 | 1097 | $this->default_lang = $obj->default_lang; |
1098 | - $this->user_id = $obj->user_id; |
|
1098 | + $this->user_id = $obj->user_id; |
|
1099 | 1099 | $this->user_login = $obj->user_login; |
1100 | - $this->canvas = $obj->canvas; |
|
1100 | + $this->canvas = $obj->canvas; |
|
1101 | 1101 | |
1102 | 1102 | $this->import_key = $obj->import_key; |
1103 | 1103 | |
@@ -1420,7 +1420,7 @@ discard block |
||
1420 | 1420 | $datas['photo'] = $photo; |
1421 | 1421 | } |
1422 | 1422 | |
1423 | - $datas['picto'] = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Contact").'</u> ' . $this->getLibStatut(4); |
|
1423 | + $datas['picto'] = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Contact").'</u> '.$this->getLibStatut(4); |
|
1424 | 1424 | $datas['name'] = '<br><b>'.$langs->trans("Name").':</b> '.$this->getFullName($langs); |
1425 | 1425 | // if ($this->civility_id) $datas['civility'] = '<br><b>' . $langs->trans("Civility") . ':</b> '.$this->civility_id; // TODO Translate civilty_id code |
1426 | 1426 | if (!empty($this->poste)) { |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | $error = 0; |
1875 | 1875 | |
1876 | 1876 | if (!isset($this->roles)) { |
1877 | - return 0; // Avoid to loose roles when property not set |
|
1877 | + return 0; // Avoid to loose roles when property not set |
|
1878 | 1878 | } |
1879 | 1879 | |
1880 | 1880 | $this->db->begin(); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | |
159 | 159 | if (empty($reshook)) { |
160 | - include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
160 | + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
161 | 161 | |
162 | 162 | // Purge search criteria |
163 | 163 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $objectclass = 'Account'; |
173 | 173 | $objectlabel = 'FinancialAccount'; |
174 | 174 | $uploaddir = $conf->banque->dir_output; |
175 | - include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php'; |
|
175 | + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /* |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | if ($searchCategoryBankOperator == 0) { |
239 | 239 | $searchCategoryBankSqlList[] = " EXISTS (SELECT ck.fk_account FROM ".MAIN_DB_PREFIX."categorie_account as ck WHERE b.rowid = ck.fk_account AND ck.fk_categorie = ".((int) $searchCategoryBank).")"; |
240 | 240 | } else { |
241 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryBank); |
|
241 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryBank); |
|
242 | 242 | } |
243 | 243 | } |
244 | 244 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | if (isModEnabled('category') && $user->hasRight('banque', 'modifier')) { |
357 | 357 | $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); |
358 | 358 | } |
359 | -if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
359 | +if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
360 | 360 | $arrayofmassactions = array(); |
361 | 361 | } |
362 | 362 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
@@ -91,7 +91,7 @@ |
||
91 | 91 | $object = new PaymentVarious($db); |
92 | 92 | $extrafields = new ExtraFields($db); |
93 | 93 | //$diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; |
94 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
94 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
95 | 95 | |
96 | 96 | // Fetch optionals attributes and labels |
97 | 97 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -53,45 +53,45 @@ discard block |
||
53 | 53 | $search_mvt_num = GETPOSTINT('search_mvt_num'); |
54 | 54 | $search_doc_type = GETPOST("search_doc_type", 'alpha'); |
55 | 55 | $search_doc_ref = GETPOST("search_doc_ref", 'alpha'); |
56 | -$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
57 | -$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
58 | -$search_date_startday = GETPOSTINT('search_date_startday'); |
|
59 | -$search_date_endyear = GETPOSTINT('search_date_endyear'); |
|
60 | -$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
61 | -$search_date_endday = GETPOSTINT('search_date_endday'); |
|
56 | +$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
57 | +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
58 | +$search_date_startday = GETPOSTINT('search_date_startday'); |
|
59 | +$search_date_endyear = GETPOSTINT('search_date_endyear'); |
|
60 | +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
61 | +$search_date_endday = GETPOSTINT('search_date_endday'); |
|
62 | 62 | $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); |
63 | 63 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
64 | 64 | $search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); |
65 | -$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
|
66 | -$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
|
67 | -$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
|
68 | -$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
|
69 | -$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
|
70 | -$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
|
65 | +$search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
|
66 | +$search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
|
67 | +$search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
|
68 | +$search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
|
69 | +$search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
|
70 | +$search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
|
71 | 71 | $search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); |
72 | 72 | $search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); |
73 | -$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); |
|
74 | -$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); |
|
75 | -$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); |
|
76 | -$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); |
|
77 | -$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); |
|
78 | -$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); |
|
73 | +$search_date_modification_startyear = GETPOSTINT('search_date_modification_startyear'); |
|
74 | +$search_date_modification_startmonth = GETPOSTINT('search_date_modification_startmonth'); |
|
75 | +$search_date_modification_startday = GETPOSTINT('search_date_modification_startday'); |
|
76 | +$search_date_modification_endyear = GETPOSTINT('search_date_modification_endyear'); |
|
77 | +$search_date_modification_endmonth = GETPOSTINT('search_date_modification_endmonth'); |
|
78 | +$search_date_modification_endday = GETPOSTINT('search_date_modification_endday'); |
|
79 | 79 | $search_date_modification_start = dol_mktime(0, 0, 0, $search_date_modification_startmonth, $search_date_modification_startday, $search_date_modification_startyear); |
80 | 80 | $search_date_modification_end = dol_mktime(23, 59, 59, $search_date_modification_endmonth, $search_date_modification_endday, $search_date_modification_endyear); |
81 | -$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); |
|
82 | -$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); |
|
83 | -$search_date_export_startday = GETPOSTINT('search_date_export_startday'); |
|
84 | -$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); |
|
85 | -$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); |
|
86 | -$search_date_export_endday = GETPOSTINT('search_date_export_endday'); |
|
81 | +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); |
|
82 | +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); |
|
83 | +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); |
|
84 | +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); |
|
85 | +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); |
|
86 | +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); |
|
87 | 87 | $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); |
88 | 88 | $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); |
89 | -$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); |
|
90 | -$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); |
|
91 | -$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); |
|
92 | -$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); |
|
93 | -$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); |
|
94 | -$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); |
|
89 | +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); |
|
90 | +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); |
|
91 | +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); |
|
92 | +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); |
|
93 | +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); |
|
94 | +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); |
|
95 | 95 | $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); |
96 | 96 | $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); |
97 | 97 | $search_import_key = GETPOST("search_import_key", 'alpha'); |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | // Ajout directives pour resoudre bug IE |
718 | 718 | header('Cache-Control: Public, must-revalidate'); |
719 | 719 | header('Pragma: public'); |
720 | - header('Content-Length: ' . dol_filesize($downloadFilePath)); |
|
720 | + header('Content-Length: '.dol_filesize($downloadFilePath)); |
|
721 | 721 | |
722 | 722 | readfileLowMemory($downloadFilePath); |
723 | 723 | } else { |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | $form_question['formatexport'] = array( |
791 | 791 | 'name' => 'formatexport', |
792 | 792 | 'type' => 'select', |
793 | - 'label' => $langs->trans('Modelcsv'), // TODO Use Selectmodelcsv and show a select combo |
|
793 | + 'label' => $langs->trans('Modelcsv'), // TODO Use Selectmodelcsv and show a select combo |
|
794 | 794 | 'values' => $listofformat, |
795 | 795 | 'default' => $formatexportset, |
796 | 796 | 'morecss' => 'minwidth200 maxwidth200' |
@@ -1311,8 +1311,8 @@ discard block |
||
1311 | 1311 | $labeltoshow .= $objectstatic->getNomUrl(1); |
1312 | 1312 | $labeltoshowalt .= $objectstatic->ref; |
1313 | 1313 | $bank_ref = strstr($line->doc_ref, '-'); |
1314 | - $labeltoshow .= " " . $bank_ref; |
|
1315 | - $labeltoshowalt .= " " . $bank_ref; |
|
1314 | + $labeltoshow .= " ".$bank_ref; |
|
1315 | + $labeltoshowalt .= " ".$bank_ref; |
|
1316 | 1316 | } else { |
1317 | 1317 | $labeltoshow .= $line->doc_ref; |
1318 | 1318 | $labeltoshowalt .= $line->doc_ref; |
@@ -52,29 +52,29 @@ discard block |
||
52 | 52 | $context_default = 'bookkeepingbyaccountlist'; |
53 | 53 | } |
54 | 54 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : $context_default; |
55 | -$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
56 | -$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
57 | -$search_date_startday = GETPOSTINT('search_date_startday'); |
|
58 | -$search_date_endyear = GETPOSTINT('search_date_endyear'); |
|
59 | -$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
60 | -$search_date_endday = GETPOSTINT('search_date_endday'); |
|
55 | +$search_date_startyear = GETPOSTINT('search_date_startyear'); |
|
56 | +$search_date_startmonth = GETPOSTINT('search_date_startmonth'); |
|
57 | +$search_date_startday = GETPOSTINT('search_date_startday'); |
|
58 | +$search_date_endyear = GETPOSTINT('search_date_endyear'); |
|
59 | +$search_date_endmonth = GETPOSTINT('search_date_endmonth'); |
|
60 | +$search_date_endday = GETPOSTINT('search_date_endday'); |
|
61 | 61 | $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); |
62 | 62 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
63 | 63 | $search_doc_date = dol_mktime(0, 0, 0, GETPOSTINT('doc_datemonth'), GETPOSTINT('doc_dateday'), GETPOSTINT('doc_dateyear')); |
64 | -$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); |
|
65 | -$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); |
|
66 | -$search_date_export_startday = GETPOSTINT('search_date_export_startday'); |
|
67 | -$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); |
|
68 | -$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); |
|
69 | -$search_date_export_endday = GETPOSTINT('search_date_export_endday'); |
|
64 | +$search_date_export_startyear = GETPOSTINT('search_date_export_startyear'); |
|
65 | +$search_date_export_startmonth = GETPOSTINT('search_date_export_startmonth'); |
|
66 | +$search_date_export_startday = GETPOSTINT('search_date_export_startday'); |
|
67 | +$search_date_export_endyear = GETPOSTINT('search_date_export_endyear'); |
|
68 | +$search_date_export_endmonth = GETPOSTINT('search_date_export_endmonth'); |
|
69 | +$search_date_export_endday = GETPOSTINT('search_date_export_endday'); |
|
70 | 70 | $search_date_export_start = dol_mktime(0, 0, 0, $search_date_export_startmonth, $search_date_export_startday, $search_date_export_startyear); |
71 | 71 | $search_date_export_end = dol_mktime(23, 59, 59, $search_date_export_endmonth, $search_date_export_endday, $search_date_export_endyear); |
72 | -$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); |
|
73 | -$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); |
|
74 | -$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); |
|
75 | -$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); |
|
76 | -$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); |
|
77 | -$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); |
|
72 | +$search_date_validation_startyear = GETPOSTINT('search_date_validation_startyear'); |
|
73 | +$search_date_validation_startmonth = GETPOSTINT('search_date_validation_startmonth'); |
|
74 | +$search_date_validation_startday = GETPOSTINT('search_date_validation_startday'); |
|
75 | +$search_date_validation_endyear = GETPOSTINT('search_date_validation_endyear'); |
|
76 | +$search_date_validation_endmonth = GETPOSTINT('search_date_validation_endmonth'); |
|
77 | +$search_date_validation_endday = GETPOSTINT('search_date_validation_endday'); |
|
78 | 78 | $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_startmonth, $search_date_validation_startday, $search_date_validation_startyear); |
79 | 79 | $search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear); |
80 | 80 | $search_import_key = GETPOST("search_import_key", 'alpha'); |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | } else { |
305 | 305 | $filter['t.numero_compte>='] = $search_accountancy_code_start; |
306 | 306 | } |
307 | - $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); |
|
307 | + $param .= '&search_accountancy_code_start='.urlencode($search_accountancy_code_start); |
|
308 | 308 | } |
309 | 309 | if (!empty($search_accountancy_code_end)) { |
310 | 310 | if ($type == 'sub') { |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | } else { |
313 | 313 | $filter['t.numero_compte<='] = $search_accountancy_code_end; |
314 | 314 | } |
315 | - $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); |
|
315 | + $param .= '&search_accountancy_code_end='.urlencode($search_accountancy_code_end); |
|
316 | 316 | } |
317 | 317 | if (!empty($search_label_account)) { |
318 | 318 | $filter['t.label_compte'] = $search_label_account; |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | } |
495 | 495 | |
496 | 496 | if (!$error) { |
497 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
497 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
498 | 498 | exit(); |
499 | 499 | } |
500 | 500 | } elseif ($massaction == 'letteringmanual') { |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | setEventMessages('', $lettering->errors, 'errors'); |
505 | 505 | } else { |
506 | 506 | setEventMessages($langs->trans('AccountancyOneLetteringModifiedSuccessfully'), array(), 'mesgs'); |
507 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
507 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
508 | 508 | exit(); |
509 | 509 | } |
510 | 510 | } elseif ($action == 'unletteringauto' && $confirm == "yes") { |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | } |
526 | 526 | |
527 | 527 | if (!$error) { |
528 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
528 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
529 | 529 | exit(); |
530 | 530 | } |
531 | 531 | } elseif ($action == 'unletteringmanual' && $confirm == "yes") { |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | setEventMessages('', $lettering->errors, 'errors'); |
536 | 536 | } else { |
537 | 537 | setEventMessages($langs->trans('AccountancyOneUnletteringModifiedSuccessfully'), array(), 'mesgs'); |
538 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?noreset=1' . $param); |
|
538 | + header('Location: '.$_SERVER['PHP_SELF'].'?noreset=1'.$param); |
|
539 | 539 | exit(); |
540 | 540 | } |
541 | 541 | } |
@@ -642,10 +642,10 @@ discard block |
||
642 | 642 | // List of mass actions available |
643 | 643 | $arrayofmassactions = array(); |
644 | 644 | if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && $user->hasRight('accounting', 'mouvements', 'creer')) { |
645 | - $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringAuto'); |
|
646 | - $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringAuto'); |
|
647 | - $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"') . $langs->trans('LetteringManual'); |
|
648 | - $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"') . $langs->trans('UnletteringManual'); |
|
645 | + $arrayofmassactions['letteringauto'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans('LetteringAuto'); |
|
646 | + $arrayofmassactions['preunletteringauto'] = img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans('UnletteringAuto'); |
|
647 | + $arrayofmassactions['letteringmanual'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans('LetteringManual'); |
|
648 | + $arrayofmassactions['preunletteringmanual'] = img_picto('', 'uncheck', 'class="pictofixedwidth"').$langs->trans('UnletteringManual'); |
|
649 | 649 | } |
650 | 650 | if ($user->hasRight('accounting', 'mouvements', 'supprimer')) { |
651 | 651 | $arrayofmassactions['predeletebookkeepingwriting'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); |
@@ -678,11 +678,11 @@ discard block |
||
678 | 678 | if (empty($reshook)) { |
679 | 679 | $newcardbutton = dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param); |
680 | 680 | if ($type == 'sub') { |
681 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
682 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
681 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
682 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?type=sub&'.$url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
683 | 683 | } else { |
684 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?' . $url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
685 | - $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?type=sub&' . $url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
684 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$url_param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected')); |
|
685 | + $newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?type=sub&'.$url_param, '', 1, array('morecss' => 'marginleftonly')); |
|
686 | 686 | } |
687 | 687 | $newcardbutton .= dolGetButtonTitleSeparator(); |
688 | 688 | $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?action=create'); |
@@ -760,8 +760,8 @@ discard block |
||
760 | 760 | } else { |
761 | 761 | $stringforfirstkey .= ' CTL +'; |
762 | 762 | } |
763 | -$moreforfilter .= ' <a id="previous_account" accesskey="p" title="' . $stringforfirstkey . ' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>'; |
|
764 | -$moreforfilter .= ' <a id="next_account" accesskey="n" title="' . $stringforfirstkey . ' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>'; |
|
763 | +$moreforfilter .= ' <a id="previous_account" accesskey="p" title="'.$stringforfirstkey.' p" class="classfortooltip" href="#"><i class="fa fa-chevron-left"></i></a>'; |
|
764 | +$moreforfilter .= ' <a id="next_account" accesskey="n" title="'.$stringforfirstkey.' n" class="classfortooltip" href="#"><i class="fa fa-chevron-right"></i></a>'; |
|
765 | 765 | $moreforfilter .= <<<SCRIPT |
766 | 766 | <script type="text/javascript"> |
767 | 767 | jQuery(document).ready(function() { |
@@ -988,8 +988,8 @@ discard block |
||
988 | 988 | } |
989 | 989 | //if (empty($accountg)) $accountg = '-'; |
990 | 990 | |
991 | - $colspan = 0; // colspan before field 'label of operation' |
|
992 | - $colspanend = 0; // colspan after debit/credit |
|
991 | + $colspan = 0; // colspan before field 'label of operation' |
|
992 | + $colspanend = 0; // colspan after debit/credit |
|
993 | 993 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
994 | 994 | $colspan++; |
995 | 995 | } |
@@ -1038,9 +1038,9 @@ discard block |
||
1038 | 1038 | if (isset($displayed_account_number)) { |
1039 | 1039 | print '<tr class="liste_total">'; |
1040 | 1040 | if ($type == 'sub') { |
1041 | - print '<td class="right" colspan="' . $colspan . '">' . $langs->trans("TotalForAccount") . ' ' . length_accounta($displayed_account_number) . ':</td>'; |
|
1041 | + print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.length_accounta($displayed_account_number).':</td>'; |
|
1042 | 1042 | } else { |
1043 | - print '<td class="right" colspan="' . $colspan . '">' . $langs->trans("TotalForAccount") . ' ' . length_accountg($displayed_account_number) . ':</td>'; |
|
1043 | + print '<td class="right" colspan="'.$colspan.'">'.$langs->trans("TotalForAccount").' '.length_accountg($displayed_account_number).':</td>'; |
|
1044 | 1044 | } |
1045 | 1045 | print '<td class="nowrap right">'.price(price2num($sous_total_debit, 'MT')).'</td>'; |
1046 | 1046 | print '<td class="nowrap right">'.price(price2num($sous_total_credit, 'MT')).'</td>'; |
@@ -1079,9 +1079,9 @@ discard block |
||
1079 | 1079 | print length_accounta($line->subledger_account); |
1080 | 1080 | } else { |
1081 | 1081 | // Should not happen: subledger account must be null or a non empty value |
1082 | - print '<span class="error">' . $langs->trans("Unknown"); |
|
1082 | + print '<span class="error">'.$langs->trans("Unknown"); |
|
1083 | 1083 | if ($line->subledger_label) { |
1084 | - print ' (' . $line->subledger_label . ')'; |
|
1084 | + print ' ('.$line->subledger_label.')'; |
|
1085 | 1085 | $htmltext = 'EmptyStringForSubledgerAccountButSubledgerLabelDefined'; |
1086 | 1086 | } else { |
1087 | 1087 | $htmltext = 'EmptyStringForSubledgerAccountAndSubledgerLabel'; |
@@ -1091,9 +1091,9 @@ discard block |
||
1091 | 1091 | } |
1092 | 1092 | } else { |
1093 | 1093 | if ($line->numero_compte != "" && $line->numero_compte != '-1') { |
1094 | - print length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte); |
|
1094 | + print length_accountg($line->numero_compte).' : '.$object->get_compte_desc($line->numero_compte); |
|
1095 | 1095 | } else { |
1096 | - print '<span class="error">' . $langs->trans("Unknown") . '</span>'; |
|
1096 | + print '<span class="error">'.$langs->trans("Unknown").'</span>'; |
|
1097 | 1097 | } |
1098 | 1098 | } |
1099 | 1099 | print '</td>'; |
@@ -1116,7 +1116,7 @@ discard block |
||
1116 | 1116 | if (in_array($line->id, $arrayofselected)) { |
1117 | 1117 | $selected = 1; |
1118 | 1118 | } |
1119 | - print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />'; |
|
1119 | + print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />'; |
|
1120 | 1120 | } |
1121 | 1121 | print '</td>'; |
1122 | 1122 | if (!$i) { |
@@ -1209,7 +1209,7 @@ discard block |
||
1209 | 1209 | } elseif ($line->doc_type == 'bank') { |
1210 | 1210 | print $objectstatic->getNomUrl(1); |
1211 | 1211 | $bank_ref = strstr($line->doc_ref, '-'); |
1212 | - print " " . $bank_ref; |
|
1212 | + print " ".$bank_ref; |
|
1213 | 1213 | } else { |
1214 | 1214 | print $line->doc_ref; |
1215 | 1215 | } |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | if (in_array($line->id, $arrayofselected)) { |
1315 | 1315 | $selected = 1; |
1316 | 1316 | } |
1317 | - print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />'; |
|
1317 | + print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />'; |
|
1318 | 1318 | } |
1319 | 1319 | print '</td>'; |
1320 | 1320 | if (!$i) { |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | // Put here code to add control on parameters values |
280 | 280 | |
281 | 281 | // Insert request |
282 | - $sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_account("; |
|
282 | + $sql = "INSERT INTO ".MAIN_DB_PREFIX."accounting_account("; |
|
283 | 283 | $sql .= "datec"; |
284 | 284 | $sql .= ", entity"; |
285 | 285 | $sql .= ", fk_pcg_version"; |
@@ -313,11 +313,11 @@ discard block |
||
313 | 313 | $resql = $this->db->query($sql); |
314 | 314 | if (!$resql) { |
315 | 315 | $error++; |
316 | - $this->errors[] = "Error " . $this->db->lasterror(); |
|
316 | + $this->errors[] = "Error ".$this->db->lasterror(); |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | if (!$error) { |
320 | - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_account"); |
|
320 | + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_account"); |
|
321 | 321 | |
322 | 322 | // Uncomment this and change MYOBJECT to your own tag if you |
323 | 323 | // want this action to call a trigger. |
@@ -333,8 +333,8 @@ discard block |
||
333 | 333 | // Commit or rollback |
334 | 334 | if ($error) { |
335 | 335 | foreach ($this->errors as $errmsg) { |
336 | - dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR); |
|
337 | - $this->error .= ($this->error ? ', ' . $errmsg : $errmsg); |
|
336 | + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); |
|
337 | + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); |
|
338 | 338 | } |
339 | 339 | $this->db->rollback(); |
340 | 340 | return -1 * $error; |
@@ -359,18 +359,18 @@ discard block |
||
359 | 359 | |
360 | 360 | $this->db->begin(); |
361 | 361 | |
362 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account "; |
|
363 | - $sql .= " SET fk_pcg_version = " . ($this->fk_pcg_version ? "'" . $this->db->escape($this->fk_pcg_version) . "'" : "null"); |
|
364 | - $sql .= " , pcg_type = " . ($this->pcg_type ? "'" . $this->db->escape($this->pcg_type) . "'" : "null"); |
|
365 | - $sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'"; |
|
366 | - $sql .= " , account_parent = " . (int) $this->account_parent; |
|
367 | - $sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "''"); |
|
368 | - $sql .= " , labelshort = " . ($this->labelshort ? "'" . $this->db->escape($this->labelshort) . "'" : "''"); |
|
369 | - $sql .= " , fk_accounting_category = " . (empty($this->account_category) ? 0 : (int) $this->account_category); |
|
370 | - $sql .= " , fk_user_modif = " . ((int) $user->id); |
|
371 | - $sql .= " , active = " . (int) $this->active; |
|
372 | - $sql .= " , reconcilable = " . (int) $this->reconcilable; |
|
373 | - $sql .= " WHERE rowid = " . ((int) $this->id); |
|
362 | + $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_account "; |
|
363 | + $sql .= " SET fk_pcg_version = ".($this->fk_pcg_version ? "'".$this->db->escape($this->fk_pcg_version)."'" : "null"); |
|
364 | + $sql .= " , pcg_type = ".($this->pcg_type ? "'".$this->db->escape($this->pcg_type)."'" : "null"); |
|
365 | + $sql .= " , account_number = '".$this->db->escape($this->account_number)."'"; |
|
366 | + $sql .= " , account_parent = ".(int) $this->account_parent; |
|
367 | + $sql .= " , label = ".($this->label ? "'".$this->db->escape($this->label)."'" : "''"); |
|
368 | + $sql .= " , labelshort = ".($this->labelshort ? "'".$this->db->escape($this->labelshort)."'" : "''"); |
|
369 | + $sql .= " , fk_accounting_category = ".(empty($this->account_category) ? 0 : (int) $this->account_category); |
|
370 | + $sql .= " , fk_user_modif = ".((int) $user->id); |
|
371 | + $sql .= " , active = ".(int) $this->active; |
|
372 | + $sql .= " , reconcilable = ".(int) $this->reconcilable; |
|
373 | + $sql .= " WHERE rowid = ".((int) $this->id); |
|
374 | 374 | |
375 | 375 | dol_syslog(get_class($this)."::update", LOG_DEBUG); |
376 | 376 | $result = $this->db->query($sql); |
@@ -440,22 +440,22 @@ discard block |
||
440 | 440 | $this->db->begin(); |
441 | 441 | |
442 | 442 | if (!$error) { |
443 | - $sql = "DELETE FROM " . MAIN_DB_PREFIX . "accounting_account"; |
|
444 | - $sql .= " WHERE rowid=" . ((int) $this->id); |
|
443 | + $sql = "DELETE FROM ".MAIN_DB_PREFIX."accounting_account"; |
|
444 | + $sql .= " WHERE rowid=".((int) $this->id); |
|
445 | 445 | |
446 | - dol_syslog(get_class($this) . "::delete sql=" . $sql); |
|
446 | + dol_syslog(get_class($this)."::delete sql=".$sql); |
|
447 | 447 | $resql = $this->db->query($sql); |
448 | 448 | if (!$resql) { |
449 | 449 | $error++; |
450 | - $this->errors[] = "Error " . $this->db->lasterror(); |
|
450 | + $this->errors[] = "Error ".$this->db->lasterror(); |
|
451 | 451 | } |
452 | 452 | } |
453 | 453 | |
454 | 454 | // Commit or rollback |
455 | 455 | if ($error) { |
456 | 456 | foreach ($this->errors as $errmsg) { |
457 | - dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR); |
|
458 | - $this->error .= ($this->error ? ', ' . $errmsg : $errmsg); |
|
457 | + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); |
|
458 | + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); |
|
459 | 459 | } |
460 | 460 | $this->db->rollback(); |
461 | 461 | return -1 * $error; |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '') |
485 | 485 | { |
486 | 486 | global $langs, $conf, $hookmanager; |
487 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; |
|
487 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; |
|
488 | 488 | |
489 | 489 | if (!empty($conf->dol_no_mouse_hover)) { |
490 | 490 | $notooltip = 1; // Force disable tooltips |
@@ -495,13 +495,13 @@ discard block |
||
495 | 495 | $url = ''; |
496 | 496 | $labelurl = ''; |
497 | 497 | if (empty($option) || $option == 'ledger') { |
498 | - $url = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start=' . urlencode((isset($this->account_number) ? $this->account_number : '')) . '&search_accountancy_code_end=' . urlencode((isset($this->account_number) ? $this->account_number : '')); |
|
498 | + $url = DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start='.urlencode((isset($this->account_number) ? $this->account_number : '')).'&search_accountancy_code_end='.urlencode((isset($this->account_number) ? $this->account_number : '')); |
|
499 | 499 | $labelurl = $langs->trans("ShowAccountingAccountInLedger"); |
500 | 500 | } elseif ($option == 'journals') { |
501 | - $url = DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start=' . urlencode($this->account_number) . '&search_accountancy_code_end=' . urlencode($this->account_number); |
|
501 | + $url = DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?search_accountancy_code_start='.urlencode($this->account_number).'&search_accountancy_code_end='.urlencode($this->account_number); |
|
502 | 502 | $labelurl = $langs->trans("ShowAccountingAccountInJournals"); |
503 | 503 | } elseif ($option == 'accountcard') { |
504 | - $url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . urlencode((string) ($this->id)); |
|
504 | + $url = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.urlencode((string) ($this->id)); |
|
505 | 505 | $labelurl = $langs->trans("ShowAccountingAccount"); |
506 | 506 | } |
507 | 507 | |
@@ -523,29 +523,29 @@ discard block |
||
523 | 523 | $labeltoshow = $this->labelshort; |
524 | 524 | } |
525 | 525 | |
526 | - $label = '<u>' . $labelurl . '</u>'; |
|
526 | + $label = '<u>'.$labelurl.'</u>'; |
|
527 | 527 | if (!empty($this->account_number)) { |
528 | - $label .= '<br><b>' . $langs->trans('AccountAccounting') . ':</b> ' . length_accountg($this->account_number); |
|
528 | + $label .= '<br><b>'.$langs->trans('AccountAccounting').':</b> '.length_accountg($this->account_number); |
|
529 | 529 | } |
530 | 530 | if (!empty($labeltoshow)) { |
531 | - $label .= '<br><b>' . $langs->trans('Label') . ':</b> ' . $labeltoshow; |
|
531 | + $label .= '<br><b>'.$langs->trans('Label').':</b> '.$labeltoshow; |
|
532 | 532 | } |
533 | 533 | if ($moretitle) { |
534 | - $label .= ' - ' . $moretitle; |
|
534 | + $label .= ' - '.$moretitle; |
|
535 | 535 | } |
536 | 536 | |
537 | 537 | $linkclose = ''; |
538 | 538 | if (empty($notooltip)) { |
539 | 539 | if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) { |
540 | 540 | $label = $labelurl; |
541 | - $linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"'; |
|
541 | + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; |
|
542 | 542 | } |
543 | - $linkclose .= ' title="' . dol_escape_htmltag($label, 1) . '"'; |
|
543 | + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; |
|
544 | 544 | $linkclose .= ' class="classfortooltip"'; |
545 | 545 | } |
546 | 546 | |
547 | - $linkstart = '<a href="' . $url . '"'; |
|
548 | - $linkstart .= $linkclose . '>'; |
|
547 | + $linkstart = '<a href="'.$url.'"'; |
|
548 | + $linkstart .= $linkclose.'>'; |
|
549 | 549 | $linkend = '</a>'; |
550 | 550 | |
551 | 551 | if ($nourl) { |
@@ -556,20 +556,20 @@ discard block |
||
556 | 556 | |
557 | 557 | $label_link = length_accountg($this->account_number); |
558 | 558 | if ($withlabel) { |
559 | - $label_link .= ' - ' . ($nourl ? '<span class="opacitymedium">' : '') . $labeltoshow . ($nourl ? '</span>' : ''); |
|
559 | + $label_link .= ' - '.($nourl ? '<span class="opacitymedium">' : '').$labeltoshow.($nourl ? '</span>' : ''); |
|
560 | 560 | } |
561 | 561 | |
562 | 562 | if ($withpicto) { |
563 | - $result .= ($linkstart . img_object(($notooltip ? '' : $label), $picto, ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1) . $linkend); |
|
563 | + $result .= ($linkstart.img_object(($notooltip ? '' : $label), $picto, ($notooltip ? '' : 'class="classfortooltip"'), 0, 0, $notooltip ? 0 : 1).$linkend); |
|
564 | 564 | } |
565 | 565 | if ($withpicto && $withpicto != 2) { |
566 | 566 | $result .= ' '; |
567 | 567 | } |
568 | 568 | if ($withpicto != 2) { |
569 | - $result .= $linkstart . $label_link . $linkend; |
|
569 | + $result .= $linkstart.$label_link.$linkend; |
|
570 | 570 | } |
571 | 571 | global $action; |
572 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
572 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
573 | 573 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
574 | 574 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
575 | 575 | if ($reshook > 0) { |
@@ -589,10 +589,10 @@ discard block |
||
589 | 589 | public function info($id) |
590 | 590 | { |
591 | 591 | $sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms as date_modification'; |
592 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as a'; |
|
593 | - $sql .= ' WHERE a.rowid = ' . ((int) $id); |
|
592 | + $sql .= ' FROM '.MAIN_DB_PREFIX.'accounting_account as a'; |
|
593 | + $sql .= ' WHERE a.rowid = '.((int) $id); |
|
594 | 594 | |
595 | - dol_syslog(get_class($this) . '::info sql=' . $sql); |
|
595 | + dol_syslog(get_class($this).'::info sql='.$sql); |
|
596 | 596 | $resql = $this->db->query($sql); |
597 | 597 | |
598 | 598 | if ($resql) { |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | $hookmanager->initHooks(array('accountancyBindingCalculation')); |
746 | 746 | |
747 | 747 | // Execute hook accountancyBindingCalculation |
748 | - $parameters = array('buyer' => $buyer, 'seller' => $seller, 'product' => $product, 'facture' => $facture, 'factureDet' => $factureDet ,'accountingAccount' => $accountingAccount, $type); |
|
748 | + $parameters = array('buyer' => $buyer, 'seller' => $seller, 'product' => $product, 'facture' => $facture, 'factureDet' => $factureDet, 'accountingAccount' => $accountingAccount, $type); |
|
749 | 749 | $reshook = $hookmanager->executeHooks('accountancyBindingCalculation', $parameters); // Note that $action and $object may have been modified by some hooks |
750 | 750 | |
751 | 751 | if (empty($reshook)) { |
@@ -756,51 +756,51 @@ discard block |
||
756 | 756 | $const_name = "BUY"; |
757 | 757 | } |
758 | 758 | |
759 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
759 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
760 | 760 | $isBuyerInEEC = isInEEC($buyer); |
761 | 761 | $isSellerInEEC = isInEEC($seller); |
762 | - $code_l = ''; // Default value for generic product/service |
|
763 | - $code_p = ''; // Value for the product/service in parameter ($product) |
|
764 | - $code_t = ''; // Default value of product account for the thirdparty |
|
762 | + $code_l = ''; // Default value for generic product/service |
|
763 | + $code_p = ''; // Value for the product/service in parameter ($product) |
|
764 | + $code_t = ''; // Default value of product account for the thirdparty |
|
765 | 765 | $suggestedid = ''; |
766 | 766 | |
767 | 767 | // Level 1 (define $code_l): Search suggested default account for product/service |
768 | 768 | $suggestedaccountingaccountbydefaultfor = ''; |
769 | 769 | if ($factureDet->product_type == 1) { |
770 | 770 | if ($buyer->country_code == $seller->country_code || empty($buyer->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) |
771 | - $code_l = getDolGlobalString('ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'); |
|
771 | + $code_l = getDolGlobalString('ACCOUNTING_SERVICE_'.$const_name.'_ACCOUNT'); |
|
772 | 772 | $suggestedaccountingaccountbydefaultfor = ''; |
773 | 773 | } else { |
774 | 774 | if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { // European intravat sale, but with a VAT |
775 | - $code_l = getDolGlobalString('ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'); |
|
775 | + $code_l = getDolGlobalString('ACCOUNTING_SERVICE_'.$const_name.'_ACCOUNT'); |
|
776 | 776 | $suggestedaccountingaccountbydefaultfor = 'eecwithvat'; |
777 | 777 | } elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { // European intravat sale, without VAT intra community number |
778 | - $code_l = getDolGlobalString('ACCOUNTING_SERVICE_' . $const_name . '_ACCOUNT'); |
|
778 | + $code_l = getDolGlobalString('ACCOUNTING_SERVICE_'.$const_name.'_ACCOUNT'); |
|
779 | 779 | $suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber'; |
780 | 780 | } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale |
781 | - $code_l = getDolGlobalString('ACCOUNTING_SERVICE_' . $const_name . '_INTRA_ACCOUNT'); |
|
781 | + $code_l = getDolGlobalString('ACCOUNTING_SERVICE_'.$const_name.'_INTRA_ACCOUNT'); |
|
782 | 782 | $suggestedaccountingaccountbydefaultfor = 'eec'; |
783 | 783 | } else { // Foreign sale |
784 | - $code_l = getDolGlobalString('ACCOUNTING_SERVICE_' . $const_name . '_EXPORT_ACCOUNT'); |
|
784 | + $code_l = getDolGlobalString('ACCOUNTING_SERVICE_'.$const_name.'_EXPORT_ACCOUNT'); |
|
785 | 785 | $suggestedaccountingaccountbydefaultfor = 'export'; |
786 | 786 | } |
787 | 787 | } |
788 | 788 | } elseif ($factureDet->product_type == 0) { |
789 | 789 | if ($buyer->country_code == $seller->country_code || empty($buyer->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) |
790 | - $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'); |
|
790 | + $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_'.$const_name.'_ACCOUNT'); |
|
791 | 791 | $suggestedaccountingaccountbydefaultfor = ''; |
792 | 792 | } else { |
793 | 793 | if ($isSellerInEEC && $isBuyerInEEC && $factureDet->tva_tx != 0) { // European intravat sale, but with a VAT |
794 | - $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'); |
|
794 | + $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_'.$const_name.'_ACCOUNT'); |
|
795 | 795 | $suggestedaccountingaccountbydefaultfor = 'eecwithvat'; |
796 | 796 | } elseif ($isSellerInEEC && $isBuyerInEEC && empty($buyer->tva_intra)) { // European intravat sale, without VAT intra community number |
797 | - $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_' . $const_name . '_ACCOUNT'); |
|
797 | + $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_'.$const_name.'_ACCOUNT'); |
|
798 | 798 | $suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber'; |
799 | 799 | } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale |
800 | - $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_' . $const_name . '_INTRA_ACCOUNT'); |
|
800 | + $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_'.$const_name.'_INTRA_ACCOUNT'); |
|
801 | 801 | $suggestedaccountingaccountbydefaultfor = 'eec'; |
802 | 802 | } else { |
803 | - $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_' . $const_name . '_EXPORT_ACCOUNT'); |
|
803 | + $code_l = getDolGlobalString('ACCOUNTING_PRODUCT_'.$const_name.'_EXPORT_ACCOUNT'); |
|
804 | 804 | $suggestedaccountingaccountbydefaultfor = 'export'; |
805 | 805 | } |
806 | 806 | } |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | } |
875 | 875 | |
876 | 876 | // Manage Deposit |
877 | - if (getDolGlobalString('ACCOUNTING_ACCOUNT_' . strtoupper($type) . '_DEPOSIT')) { |
|
877 | + if (getDolGlobalString('ACCOUNTING_ACCOUNT_'.strtoupper($type).'_DEPOSIT')) { |
|
878 | 878 | if ($factureDet->desc == "(DEPOSIT)" || $facture->type == $facture::TYPE_DEPOSIT) { |
879 | 879 | $accountdeposittoventilated = new self($this->db); |
880 | 880 | if ($type == 'customer') { |